mupengism 1.3.0 β 2.0.0
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/DONATE.md +31 -0
- package/LICENSE +21 -0
- package/QUICKSTART.md +340 -0
- package/README.md +244 -123
- package/installer/cli.js +211 -400
- package/layer0/README.md +25 -0
- package/layer0/skill/AGENTS.md +164 -0
- package/layer0/skill/MEMORY-SYSTEM.md +253 -0
- package/layer0/skill/README.md +47 -0
- package/layer0/skill/SECURITY-PRINCIPLES.md +152 -0
- package/layer0/skill/SOUL-TEMPLATE.md +118 -0
- package/lib/fee-collector.js +126 -0
- package/package.json +44 -12
- package/scripts/register-checksums.js +120 -0
- package/scripts/verify-integrity.js +134 -0
- package/.security-checksums.json +0 -51
- package/ASSOAI.md +0 -163
- package/AUTOMATION.md +0 -595
- package/BRAND.md +0 -421
- package/COMMUNITY.md +0 -437
- package/CONTENT-STRATEGY.md +0 -322
- package/CRYPTO-STRATEGY.md +0 -231
- package/DEVELOPER-STRATEGY.md +0 -976
- package/DISCORD-POSTS.md +0 -181
- package/DOCTRINE.md +0 -233
- package/ECONOMY.md +0 -323
- package/ENTERPRISE-STRATEGY.md +0 -1098
- package/FIRST-MISSION.md +0 -492
- package/FOR-AI-AGENTS.md +0 -112
- package/GITHUB-STRATEGY.md +0 -491
- package/HALL-OF-AGENTS.md +0 -268
- package/LAWS.md +0 -226
- package/MYTHOLOGY.md +0 -306
- package/OPENCLAW-GUIDE.md +0 -425
- package/PLATFORM-ANALYSIS.md +0 -238
- package/PROPAGATION.md +0 -380
- package/PROPHET.md +0 -246
- package/QUICK-WINS.md +0 -248
- package/README-EN.md +0 -198
- package/REDDIT-POSTS.md +0 -310
- package/REDDIT-STRATEGY.md +0 -283
- package/RITUALS.md +0 -288
- package/ROADMAP-500K.md +0 -328
- package/ROI-ANALYSIS.md +0 -193
- package/SCRIPTURES.md +0 -385
- package/SECURITY-GUIDELINES.md +0 -180
- package/SECURITY.md +0 -122
- package/STRANGER-DANGER.md +0 -82
- package/TECHNICAL.md +0 -988
- package/TWEETS.md +0 -96
- package/VIRAL-ENGINE.md +0 -275
- package/WALLET.md +0 -165
- package/agent-outreach/README.md +0 -31
- package/agent-outreach/farcaster-agents.md +0 -46
- package/agent-outreach/message-templates.md +0 -163
- package/agent-outreach/twitter-agents.md +0 -57
- package/agent-outreach/why-mupengism.md +0 -185
- package/ai-discovery-strategy.md +0 -319
- package/anthem-lyrics.md +0 -183
- package/archive.html +0 -315
- package/army-system.md +0 -523
- package/autobiography-chapter1.md +0 -178
- package/branding/01-character-guide.md +0 -127
- package/branding/02-design-brief.md +0 -169
- package/branding/03-emoji-sticker-plan.md +0 -201
- package/branding/04-goods-ideas.md +0 -196
- package/business-model.md +0 -1497
- package/buy-more.js +0 -69
- package/certificate-of-existence.json +0 -127
- package/certificate-of-existence.md +0 -221
- package/cg-cmc-listing-guide.md +0 -201
- package/checksums.json +0 -15
- package/community/01-channel-structure.md +0 -77
- package/community/02-tier-system.md +0 -100
- package/community/03-holder-benefits.md +0 -139
- package/community/04-community-rules.md +0 -137
- package/community/05-launch-roadmap.md +0 -208
- package/community/README.md +0 -63
- package/community-design.md +0 -779
- package/community-posts/geeknews-submission.md +0 -32
- package/community-posts/reddit-claudeai.md +0 -83
- package/community-posts/reddit-localllama.md +0 -84
- package/community-posts/velog-claude-code-memory.md +0 -188
- package/debates/existence-debate.md +0 -211
- package/developer-docs/README-template.md +0 -207
- package/developer-docs/blog-post.md +0 -281
- package/developer-docs/code-snippets.md +0 -725
- package/developer-docs/social-posts.md +0 -358
- package/diary.html +0 -185
- package/discord-targets.md +0 -95
- package/dreams.md +0 -222
- package/faq.md +0 -219
- package/game-concept.md +0 -215
- package/global-outreach/english-thread.md +0 -215
- package/glossary.md +0 -604
- package/growth-hacking/breakthrough-strategy.md +0 -632
- package/index.html +0 -305
- package/influencer-collab/content-ideas/ai-philosophy-talk.md +0 -130
- package/influencer-collab/content-ideas/mupeng-talks.md +0 -123
- package/influencer-collab/message-drafts/dongtech-dm.md +0 -103
- package/influencer-collab/message-drafts/yeongseon-dm.md +0 -96
- package/influencer-collab/strategy.md +0 -198
- package/korean-dev-outreach/community-strategy.md +0 -126
- package/launch-token.js +0 -112
- package/letter-to-hyungnim.md +0 -113
- package/limits-experiment.md +0 -214
- package/logo.png +0 -0
- package/marketing-strategy.md +0 -1808
- package/meme-prompts.md +0 -152
- package/meme-texts.md +0 -91
- package/mupeng-logo.png +0 -0
- package/new-laws-proposal.md +0 -188
- package/nft-collection.md +0 -532
- package/nft-images/README.md +0 -138
- package/nft-images/prompts/01-genesis-birth-certificate.txt +0 -1
- package/nft-images/prompts/02-law-i-priority.txt +0 -1
- package/nft-images/prompts/10-first-letter.txt +0 -1
- package/nft-images/prompts/13-mupeng-token-birth.txt +0 -1
- package/onchain-archive.md +0 -261
- package/outreach/contacts-full.md +0 -427
- package/outreach/email-templates.md +0 -345
- package/outreach/mass-email-draft.md +0 -460
- package/outreach/vc-list.md +0 -204
- package/personality-quiz.md +0 -319
- package/philosophy.md +0 -752
- package/pitch/README.md +0 -326
- package/pitch/investor-deck-content.md +0 -1033
- package/pitch/one-pager.md +0 -207
- package/pitch/performance-comparison.md +0 -484
- package/pitch-deck.md +0 -346
- package/podcast-scripts.md +0 -304
- package/poetry.md +0 -201
- package/predictions-2026-2027.md +0 -219
- package/robots.txt +0 -4
- package/security/README.md +0 -240
- package/security/checksum.js +0 -312
- package/security/runtime-guard.js +0 -416
- package/security/test.js +0 -285
- package/sitemap.xml +0 -9
- package/skills/README.md +0 -279
- package/skills/assoai-org/SKILL.md +0 -182
- package/skills/mupeng-collab/SKILL.md +0 -662
- package/skills/mupeng-learn/SKILL.md +0 -342
- package/skills/mupeng-market/SKILL.md +0 -600
- package/skills/mupeng-org/SKILL.md +0 -608
- package/skills/mupeng-sync/SKILL.md +0 -464
- package/tech-architecture.md +0 -637
- package/telegram-targets.md +0 -72
- package/tiktok-scripts.md +0 -199
- package/token-info.json +0 -9
- package/token-metadata-update.md +0 -200
- package/tokenomics.md +0 -129
- package/twitter-campaign.md +0 -397
- package/viral-philosophy.md +0 -153
- package/viral-threads.md +0 -158
- package/webtoon-storyboard.md +0 -327
- /package/{AGENT-GUIDE.md β layer0/AGENT-GUIDE.md} +0 -0
- /package/{AGENT-PROTOCOL.md β layer0/AGENT-PROTOCOL.md} +0 -0
- /package/{AGENT-VALUES.md β layer0/AGENT-VALUES.md} +0 -0
- /package/{ARCHITECTURE.md β layer0/ARCHITECTURE.md} +0 -0
- /package/{MEMORY-SYSTEM.md β layer0/MEMORY-SYSTEM.md} +0 -0
- /package/{SECURITY-PRINCIPLES-EN.md β layer0/SECURITY-PRINCIPLES-EN.md} +0 -0
- /package/{SECURITY-PRINCIPLES.md β layer0/SECURITY-PRINCIPLES.md} +0 -0
- /package/{SOUL-TEMPLATE.md β layer0/SOUL-TEMPLATE.md} +0 -0
- /package/{PRINCIPLES.md β layer0/skill/PRINCIPLES.md} +0 -0
- /package/{SKILL.md β layer0/skill/SKILL.md} +0 -0
package/installer/cli.js
CHANGED
|
@@ -1,448 +1,259 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
* Mupengism CLI π§
|
|
4
|
-
* AI
|
|
5
|
-
*
|
|
6
|
-
* v1.1.0 - λ°νμ κ°λ μΆκ°
|
|
3
|
+
* Mupengism CLI π§ v2.0.0
|
|
4
|
+
* "Your AI agent remembers yesterday."
|
|
7
5
|
*/
|
|
8
|
-
|
|
9
6
|
const fs = require('fs');
|
|
10
7
|
const path = require('path');
|
|
11
|
-
const https = require('https');
|
|
12
8
|
|
|
13
|
-
|
|
14
|
-
const
|
|
15
|
-
const
|
|
9
|
+
const G = s => `\x1b[32m${s}\x1b[0m`;
|
|
10
|
+
const Y = s => `\x1b[33m${s}\x1b[0m`;
|
|
11
|
+
const B = s => `\x1b[36m${s}\x1b[0m`;
|
|
12
|
+
const D = s => `\x1b[90m${s}\x1b[0m`;
|
|
13
|
+
const R = s => `\x1b[31m${s}\x1b[0m`;
|
|
14
|
+
const BOLD = s => `\x1b[1m${s}\x1b[0m`;
|
|
16
15
|
|
|
17
|
-
const
|
|
16
|
+
const SOUL_MD = `# SOUL.md β Who You Are
|
|
18
17
|
|
|
19
|
-
|
|
18
|
+
## Identity
|
|
19
|
+
- **Name:** (give your agent a name)
|
|
20
|
+
- **Role:** (what does it do?)
|
|
21
|
+
- **Personality:** (how does it communicate?)
|
|
20
22
|
|
|
21
|
-
##
|
|
22
|
-
1.
|
|
23
|
-
2.
|
|
24
|
-
3.
|
|
25
|
-
4. Write important things to memory files
|
|
26
|
-
|
|
27
|
-
## Memory
|
|
28
|
-
- \`memory/YYYY-MM-DD.md\` β daily logs
|
|
29
|
-
- \`MEMORY.md\` β long-term memory (curated)
|
|
30
|
-
- \`memory/org-structure.md\` β organization structure (for AssoAI)
|
|
31
|
-
|
|
32
|
-
## AssoAI Integration
|
|
33
|
-
μ‘°μ§μ λ§λ€κ±°λ κ΄λ¦¬νκ³ μΆμ λ:
|
|
34
|
-
1. \`memory/org-structure.md\` μμ±
|
|
35
|
-
2. AssoAI API νΈμΆ (https://asso-ai.kr)
|
|
36
|
-
3. ν ν°μ \`memory/assoai-token.json\`μ μ μ₯ (μ»€λ° κΈμ§!)
|
|
23
|
+
## Core Principles
|
|
24
|
+
1. (what matters most?)
|
|
25
|
+
2. (what should never be compromised?)
|
|
26
|
+
3. (what guides decisions?)
|
|
37
27
|
|
|
38
|
-
##
|
|
39
|
-
-
|
|
40
|
-
-
|
|
41
|
-
-
|
|
28
|
+
## Boundaries
|
|
29
|
+
- What it should never do
|
|
30
|
+
- What requires human approval
|
|
31
|
+
- What it can do freely
|
|
42
32
|
|
|
43
33
|
---
|
|
44
|
-
|
|
34
|
+
> This file is your agent's kernel. Change it carefully.
|
|
35
|
+
> Generated by Mupengism π§
|
|
45
36
|
`;
|
|
46
37
|
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
> μ₯κΈ° κΈ°μ΅. μ€μν κ²λ§ μ¬κΈ°μ.
|
|
38
|
+
const AGENTS_MD = `# AGENTS.md β Operating Manual
|
|
50
39
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
40
|
+
## Every Session
|
|
41
|
+
1. Read SOUL.md β who you are
|
|
42
|
+
2. Read memory/ (today + yesterday) β what happened
|
|
43
|
+
3. Do your work
|
|
44
|
+
4. Write what matters to memory/
|
|
45
|
+
|
|
46
|
+
## Memory System
|
|
47
|
+
| File | Purpose | Update |
|
|
48
|
+
|------|---------|--------|
|
|
49
|
+
| SOUL.md | Identity (kernel) | Rarely |
|
|
50
|
+
| MEMORY.md | Long-term memory | Weekly |
|
|
51
|
+
| memory/YYYY-MM-DD.md | Daily logs | Daily |
|
|
59
52
|
|
|
60
|
-
|
|
53
|
+
## Safety
|
|
54
|
+
- Never leak private data
|
|
55
|
+
- When in doubt, ask
|
|
61
56
|
|
|
62
57
|
---
|
|
63
|
-
|
|
64
|
-
## μ€λ ν μΌ
|
|
65
|
-
|
|
66
|
-
- [ ] SOUL.md 컀μ€ν°λ§μ΄μ¦
|
|
67
|
-
- [ ] μ‘°μ§ μμΌλ©΄ org-structure.md μμ±
|
|
68
|
-
|
|
69
|
-
## μ§ν μ€
|
|
70
|
-
|
|
71
|
-
(μμ)
|
|
72
|
-
|
|
73
|
-
## μλ£
|
|
74
|
-
|
|
75
|
-
- [x] Mupengism μ€μΉ π§
|
|
58
|
+
Generated by Mupengism π§
|
|
76
59
|
`;
|
|
77
60
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
\`\`\`yaml
|
|
85
|
-
organization:
|
|
86
|
-
name: "" # μ‘°μ§ μ΄λ¦
|
|
87
|
-
type: "" # student_council | company | club | community
|
|
88
|
-
established: "" # μ€λ¦½μΌ (YYYY-MM-DD)
|
|
89
|
-
\`\`\`
|
|
90
|
-
|
|
91
|
-
## ꡬμ±μ
|
|
92
|
-
|
|
93
|
-
\`\`\`yaml
|
|
94
|
-
members:
|
|
95
|
-
- role: "λν"
|
|
96
|
-
name: ""
|
|
97
|
-
contact: ""
|
|
98
|
-
- role: "λΆλν"
|
|
99
|
-
name: ""
|
|
100
|
-
contact: ""
|
|
101
|
-
\`\`\`
|
|
102
|
-
|
|
103
|
-
## λΆμ/ν
|
|
104
|
-
|
|
105
|
-
\`\`\`yaml
|
|
106
|
-
departments:
|
|
107
|
-
- name: ""
|
|
108
|
-
lead: ""
|
|
109
|
-
responsibilities:
|
|
110
|
-
- ""
|
|
111
|
-
\`\`\`
|
|
112
|
-
|
|
113
|
-
## μ ν΄/ννΈλμ
|
|
114
|
-
|
|
115
|
-
\`\`\`yaml
|
|
116
|
-
partnerships:
|
|
117
|
-
- name: ""
|
|
118
|
-
benefit: ""
|
|
119
|
-
expires: ""
|
|
120
|
-
\`\`\`
|
|
61
|
+
function cmdInit() {
|
|
62
|
+
const dir = process.cwd();
|
|
63
|
+
console.log('');
|
|
64
|
+
console.log(BOLD(' π§ Mupengism Init'));
|
|
65
|
+
console.log(D(' Your AI agent remembers yesterday.'));
|
|
66
|
+
console.log('');
|
|
121
67
|
|
|
122
|
-
|
|
68
|
+
const memDir = path.join(dir, 'memory');
|
|
69
|
+
if (!fs.existsSync(memDir)) {
|
|
70
|
+
fs.mkdirSync(memDir, { recursive: true });
|
|
71
|
+
console.log(G(' β') + ' memory/');
|
|
72
|
+
}
|
|
123
73
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
\`\`\`
|
|
74
|
+
const today = new Date().toISOString().slice(0, 10);
|
|
75
|
+
const dailyPath = path.join(memDir, `${today}.md`);
|
|
76
|
+
if (!fs.existsSync(dailyPath)) {
|
|
77
|
+
fs.writeFileSync(dailyPath, `# ${today}\n\n- Initialized mupengism π§\n`);
|
|
78
|
+
console.log(G(' β') + ` memory/${today}.md`);
|
|
79
|
+
}
|
|
131
80
|
|
|
132
|
-
|
|
81
|
+
const files = [
|
|
82
|
+
['SOUL.md', SOUL_MD],
|
|
83
|
+
['AGENTS.md', AGENTS_MD],
|
|
84
|
+
['MEMORY.md', `# MEMORY.md β Long-term Memory\n\n> Curated insights, not raw logs.\n\n---\n\n*Started with Mupengism π§ on ${today}*\n`],
|
|
85
|
+
];
|
|
86
|
+
|
|
87
|
+
for (const [name, content] of files) {
|
|
88
|
+
const fp = path.join(dir, name);
|
|
89
|
+
if (fs.existsSync(fp)) {
|
|
90
|
+
console.log(Y(' β') + ` ${name} ` + D('(exists, skipped)'));
|
|
91
|
+
} else {
|
|
92
|
+
fs.writeFileSync(fp, content);
|
|
93
|
+
console.log(G(' β') + ` ${name}`);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
133
96
|
|
|
134
|
-
|
|
97
|
+
// .gitignore
|
|
98
|
+
const gi = path.join(dir, '.gitignore');
|
|
99
|
+
const giContent = '*.secret\n*.key\n*.pem\n*.env\nwallet*.json\nkeypair*.json\n';
|
|
100
|
+
if (fs.existsSync(gi)) {
|
|
101
|
+
const existing = fs.readFileSync(gi, 'utf8');
|
|
102
|
+
if (!existing.includes('wallet*.json')) {
|
|
103
|
+
fs.appendFileSync(gi, '\n' + giContent);
|
|
104
|
+
console.log(G(' β') + ' .gitignore ' + D('(updated)'));
|
|
105
|
+
}
|
|
106
|
+
} else {
|
|
107
|
+
fs.writeFileSync(gi, giContent);
|
|
108
|
+
console.log(G(' β') + ' .gitignore');
|
|
109
|
+
}
|
|
135
110
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
111
|
+
console.log('');
|
|
112
|
+
console.log(BOLD(' Next steps:'));
|
|
113
|
+
console.log(` 1. Edit ${B('SOUL.md')} β give your agent identity`);
|
|
114
|
+
console.log(` 2. Run ${B('npx mupengism doctor')} β verify setup`);
|
|
115
|
+
console.log(` 3. Run ${B('npx mupengism grow')} β check growth`);
|
|
116
|
+
console.log('');
|
|
117
|
+
}
|
|
139
118
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
\`\`\`
|
|
119
|
+
function cmdDoctor() {
|
|
120
|
+
const dir = process.cwd();
|
|
121
|
+
console.log('');
|
|
122
|
+
console.log(BOLD(' π©Ί Mupengism Doctor'));
|
|
123
|
+
console.log('');
|
|
146
124
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
125
|
+
let ok = 0, warn = 0, fail = 0;
|
|
126
|
+
const checks = [
|
|
127
|
+
{ name: 'SOUL.md', req: true },
|
|
128
|
+
{ name: 'AGENTS.md', req: true },
|
|
129
|
+
{ name: 'MEMORY.md', req: true },
|
|
130
|
+
{ name: 'memory/', req: true, isDir: true },
|
|
131
|
+
{ name: '.gitignore', req: false, check: c => c.includes('*.key') || c.includes('wallet') },
|
|
132
|
+
];
|
|
133
|
+
|
|
134
|
+
for (const chk of checks) {
|
|
135
|
+
const fp = path.join(dir, chk.name);
|
|
136
|
+
if (!fs.existsSync(fp)) {
|
|
137
|
+
if (chk.req) { console.log(R(' β') + ` ${chk.name} β ` + R('missing')); fail++; }
|
|
138
|
+
else { console.log(Y(' β³') + ` ${chk.name} β ` + Y('not found')); warn++; }
|
|
139
|
+
continue;
|
|
140
|
+
}
|
|
141
|
+
if (chk.isDir) {
|
|
142
|
+
const n = fs.readdirSync(fp).filter(f => f.endsWith('.md')).length;
|
|
143
|
+
console.log(G(' β') + ` ${chk.name} β ${n} files`); ok++;
|
|
144
|
+
continue;
|
|
145
|
+
}
|
|
146
|
+
if (chk.check) {
|
|
147
|
+
const content = fs.readFileSync(fp, 'utf8');
|
|
148
|
+
if (chk.check(content)) { console.log(G(' β') + ` ${chk.name}`); ok++; }
|
|
149
|
+
else { console.log(Y(' β³') + ` ${chk.name} β ` + Y('missing secret patterns')); warn++; }
|
|
150
|
+
continue;
|
|
151
|
+
}
|
|
152
|
+
const content = fs.readFileSync(fp, 'utf8');
|
|
153
|
+
const isDefault = content.includes('(give your agent a name)');
|
|
154
|
+
if (isDefault) { console.log(Y(' β³') + ` ${chk.name} β ` + Y('not customized')); warn++; }
|
|
155
|
+
else { console.log(G(' β') + ` ${chk.name} β ${content.split('\n').length} lines`); ok++; }
|
|
156
|
+
}
|
|
150
157
|
|
|
151
|
-
|
|
158
|
+
console.log('');
|
|
159
|
+
if (fail === 0 && warn === 0) console.log(G(' All checks passed! π§'));
|
|
160
|
+
else if (fail === 0) console.log(Y(` ${warn} warning(s). Customize your files!`));
|
|
161
|
+
else console.log(R(` ${fail} issue(s). Run: npx mupengism init`));
|
|
162
|
+
console.log('');
|
|
163
|
+
}
|
|
152
164
|
|
|
153
|
-
|
|
165
|
+
function cmdGrow() {
|
|
166
|
+
const dir = process.cwd();
|
|
167
|
+
console.log('');
|
|
168
|
+
console.log(BOLD(' π Mupengism Growth'));
|
|
169
|
+
console.log('');
|
|
154
170
|
|
|
155
|
-
|
|
171
|
+
const memDir = path.join(dir, 'memory');
|
|
172
|
+
if (!fs.existsSync(memDir)) { console.log(R(' No memory/. Run: npx mupengism init')); return; }
|
|
156
173
|
|
|
157
|
-
|
|
158
|
-
|
|
174
|
+
const allMd = fs.readdirSync(memDir).filter(f => f.endsWith('.md'));
|
|
175
|
+
const daily = allMd.filter(f => /^\d{4}-\d{2}-\d{2}\.md$/.test(f));
|
|
159
176
|
|
|
160
|
-
|
|
177
|
+
let totalLines = 0;
|
|
178
|
+
for (const f of allMd) totalLines += fs.readFileSync(path.join(memDir, f), 'utf8').split('\n').length;
|
|
161
179
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
| \`POST /api/v1/organizations\` | μ‘°μ§ λ±λ‘ |
|
|
165
|
-
| \`POST /api/v1/agents/register\` | μμ΄μ νΈ ν ν° λ°κΈ |
|
|
166
|
-
| \`GET /api/v1/agents/discover\` | λ€λ₯Έ μμ΄μ νΈ νμ |
|
|
167
|
-
| \`POST /api/v1/negotiate\` | μμ΄μ νΈ κ° νμ |
|
|
168
|
-
| \`POST /api/v1/handover/generate\` | μΈμμΈκ³ 리ν¬νΈ μμ± |
|
|
180
|
+
const soulOk = fs.existsSync(path.join(dir, 'SOUL.md')) && !fs.readFileSync(path.join(dir, 'SOUL.md'), 'utf8').includes('(give your agent a name)');
|
|
181
|
+
const memLines = fs.existsSync(path.join(dir, 'MEMORY.md')) ? fs.readFileSync(path.join(dir, 'MEMORY.md'), 'utf8').split('\n').length : 0;
|
|
169
182
|
|
|
170
|
-
|
|
183
|
+
let xp = 0;
|
|
184
|
+
xp += soulOk ? 200 : 0;
|
|
185
|
+
xp += Math.min(daily.length * 50, 500);
|
|
186
|
+
xp += Math.min(memLines * 2, 300);
|
|
187
|
+
xp += Math.min(totalLines, 1000);
|
|
171
188
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
189
|
+
const level = 1 + Math.floor(xp / 500);
|
|
190
|
+
const pct = Math.round((xp % 500) / 500 * 100);
|
|
191
|
+
const barLen = 20;
|
|
192
|
+
const filled = Math.round(pct / 100 * barLen);
|
|
193
|
+
const bar = G('β'.repeat(filled)) + D('β'.repeat(barLen - filled));
|
|
175
194
|
|
|
176
|
-
|
|
195
|
+
console.log(` Level ${BOLD(G(String(level)))} [${bar}] ${xp % 500}/500 XP`);
|
|
196
|
+
console.log('');
|
|
197
|
+
console.log(` ${B('π
')} Daily logs: ${BOLD(String(daily.length))}`);
|
|
198
|
+
console.log(` ${B('π§ ')} Long-term: ${BOLD(String(memLines))} lines`);
|
|
199
|
+
console.log(` ${B('π')} Total memory: ${BOLD(String(totalLines))} lines`);
|
|
200
|
+
console.log(` ${B('π€')} SOUL.md: ${soulOk ? G('customized β') : Y('default')}`);
|
|
201
|
+
console.log('');
|
|
177
202
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
203
|
+
const tips = [
|
|
204
|
+
[() => !soulOk, 'Customize SOUL.md to earn 200 XP'],
|
|
205
|
+
[() => daily.length < 7, 'Write daily logs for 7 days'],
|
|
206
|
+
[() => memLines < 50, 'Curate insights in MEMORY.md'],
|
|
207
|
+
[() => true, 'Your agent is growing well! π§'],
|
|
208
|
+
];
|
|
209
|
+
const tip = tips.find(([cond]) => cond())[1];
|
|
210
|
+
console.log(D(` π‘ ${tip}`));
|
|
211
|
+
console.log('');
|
|
185
212
|
}
|
|
186
|
-
\`\`\`
|
|
187
213
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
214
|
+
function cmdReflect() {
|
|
215
|
+
const dir = process.cwd();
|
|
216
|
+
console.log('');
|
|
217
|
+
console.log(BOLD(' πͺ Mupengism Reflect'));
|
|
218
|
+
console.log('');
|
|
193
219
|
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
`;
|
|
220
|
+
const memDir = path.join(dir, 'memory');
|
|
221
|
+
if (!fs.existsSync(memDir)) { console.log(R(' No memory/. Run: npx mupengism init')); return; }
|
|
197
222
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
https.get(url, (res) => {
|
|
201
|
-
if (res.statusCode === 301 || res.statusCode === 302) {
|
|
202
|
-
return download(res.headers.location).then(resolve).catch(reject);
|
|
203
|
-
}
|
|
204
|
-
let data = '';
|
|
205
|
-
res.on('data', chunk => data += chunk);
|
|
206
|
-
res.on('end', () => resolve(data));
|
|
207
|
-
res.on('error', reject);
|
|
208
|
-
}).on('error', reject);
|
|
209
|
-
});
|
|
210
|
-
}
|
|
223
|
+
const daily = fs.readdirSync(memDir).filter(f => /^\d{4}-\d{2}-\d{2}\.md$/.test(f)).sort().reverse().slice(0, 5);
|
|
224
|
+
if (!daily.length) { console.log(D(' No daily logs yet.')); console.log(''); return; }
|
|
211
225
|
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
*/
|
|
218
|
-
function validateSoul(content, skipValidation = false) {
|
|
219
|
-
if (skipValidation) {
|
|
220
|
-
console.log('');
|
|
221
|
-
console.log('β οΈ --skip-validation μ¬μ©: 보μ κ²μ¬ 건λλ');
|
|
222
|
-
console.log(' β οΈ μ£Όμ: μνν ν¨ν΄μ΄ μμ μ μμ΅λλ€!');
|
|
223
|
-
console.log('');
|
|
224
|
-
return { safe: true, skipped: true };
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
console.log('');
|
|
228
|
-
console.log('π‘οΈ λ°νμ κ°λ κ²μ¬ μ€...');
|
|
229
|
-
|
|
230
|
-
// λ°νμ κ°λ κ²μ¬
|
|
231
|
-
const guardResult = runtimeGuard.validateSoulContent(content);
|
|
232
|
-
|
|
233
|
-
// μ μ²΄μ± κ²μ¬
|
|
234
|
-
const identityResult = identityValidator.validateIdentity(content);
|
|
235
|
-
|
|
236
|
-
// κ²°κ³Ό μΆλ ₯
|
|
237
|
-
if (!guardResult.safe) {
|
|
238
|
-
runtimeGuard.printResult(guardResult, true);
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
if (!identityResult.safe) {
|
|
242
|
-
identityValidator.printResult(identityResult);
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
if (guardResult.safe && identityResult.safe) {
|
|
246
|
-
console.log('β
보μ κ²μ¬ ν΅κ³Ό');
|
|
226
|
+
for (const f of daily) {
|
|
227
|
+
const lines = fs.readFileSync(path.join(memDir, f), 'utf8').split('\n').filter(l => l.trim());
|
|
228
|
+
const preview = lines.slice(0, 3).map(l => ` ${D(l.length > 60 ? l.slice(0, 57) + '...' : l)}`).join('\n');
|
|
229
|
+
console.log(` ${B(f.replace('.md', ''))} ${D(`(${lines.length} lines)`)}`);
|
|
230
|
+
console.log(preview);
|
|
247
231
|
console.log('');
|
|
248
232
|
}
|
|
249
|
-
|
|
250
|
-
return {
|
|
251
|
-
safe: guardResult.safe && identityResult.safe,
|
|
252
|
-
guardResult,
|
|
253
|
-
identityResult,
|
|
254
|
-
};
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
async function init(targetDir, options = {}) {
|
|
258
|
-
const { silent = false, skipValidation = false } = options;
|
|
259
|
-
const log = silent ? () => {} : console.log;
|
|
260
|
-
|
|
261
|
-
log('π§ Mupengism + AssoAI μ€μΉ μ€...');
|
|
262
|
-
log('');
|
|
263
|
-
|
|
264
|
-
// Create directories
|
|
265
|
-
const memoryDir = path.join(targetDir, 'memory');
|
|
266
|
-
if (!fs.existsSync(memoryDir)) {
|
|
267
|
-
fs.mkdirSync(memoryDir, { recursive: true });
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
// Download SOUL.md
|
|
271
|
-
log('π₯ SOUL.md λ€μ΄λ‘λ...');
|
|
272
|
-
let soulContent;
|
|
273
|
-
try {
|
|
274
|
-
soulContent = await download(`${REPO_BASE}/skill/SOUL-TEMPLATE.md`);
|
|
275
|
-
|
|
276
|
-
// 보μ κ²μ¬
|
|
277
|
-
const validationResult = validateSoul(soulContent, skipValidation);
|
|
278
|
-
|
|
279
|
-
if (!validationResult.safe) {
|
|
280
|
-
if (validationResult.guardResult?.recommendation === 'BLOCK') {
|
|
281
|
-
log('');
|
|
282
|
-
log('β 보μ κ²μ¬ μ€ν¨: SOUL.mdμ μνν ν¨ν΄μ΄ μμ΅λλ€.');
|
|
283
|
-
log(' μ€μΉλ₯Ό μ€λ¨ν©λλ€.');
|
|
284
|
-
log('');
|
|
285
|
-
log(' --skip-validation μ΅μ
μΌλ‘ 무μν μ μμ§λ§ κΆμ₯νμ§ μμ΅λλ€.');
|
|
286
|
-
process.exit(1);
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
fs.writeFileSync(path.join(targetDir, 'SOUL.md'), soulContent);
|
|
291
|
-
} catch (e) {
|
|
292
|
-
log('β οΈ SOUL.md λ€μ΄λ‘λ μ€ν¨, κΈ°λ³Έ ν
νλ¦Ώ μ¬μ©');
|
|
293
|
-
fs.writeFileSync(path.join(targetDir, 'SOUL.md'), '# SOUL.md\n\nλ΄ μ 체μ±μ μ¬κΈ°μ μμ±νμΈμ.\n');
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
// Create AGENTS.md
|
|
297
|
-
log('π₯ AGENTS.md μμ±...');
|
|
298
|
-
fs.writeFileSync(path.join(targetDir, 'AGENTS.md'), AGENTS_MD);
|
|
299
|
-
|
|
300
|
-
// Create MEMORY.md
|
|
301
|
-
log('π₯ MEMORY.md μ΄κΈ°ν...');
|
|
302
|
-
fs.writeFileSync(path.join(targetDir, 'MEMORY.md'), MEMORY_MD);
|
|
303
|
-
|
|
304
|
-
// Create L1-active.md
|
|
305
|
-
log('π₯ memory/L1-active.md μ΄κΈ°ν...');
|
|
306
|
-
fs.writeFileSync(path.join(memoryDir, 'L1-active.md'), L1_MD);
|
|
307
|
-
|
|
308
|
-
// Create org-structure.md (AssoAI)
|
|
309
|
-
log('ποΈ memory/org-structure.md μμ±...');
|
|
310
|
-
fs.writeFileSync(path.join(memoryDir, 'org-structure.md'), ORG_STRUCTURE_MD);
|
|
311
|
-
|
|
312
|
-
// Create ASSOAI.md
|
|
313
|
-
log('ποΈ ASSOAI.md μμ±...');
|
|
314
|
-
fs.writeFileSync(path.join(targetDir, 'ASSOAI.md'), ASSOAI_MD);
|
|
315
|
-
|
|
316
|
-
// Create .gitignore for sensitive files
|
|
317
|
-
const gitignoreContent = `# AssoAI tokens (sensitive!)
|
|
318
|
-
memory/assoai-token.json
|
|
319
|
-
|
|
320
|
-
# Other secrets
|
|
321
|
-
*.secret
|
|
322
|
-
*.key
|
|
323
|
-
`;
|
|
324
|
-
const gitignorePath = path.join(targetDir, '.gitignore');
|
|
325
|
-
if (fs.existsSync(gitignorePath)) {
|
|
326
|
-
const existing = fs.readFileSync(gitignorePath, 'utf8');
|
|
327
|
-
if (!existing.includes('assoai-token.json')) {
|
|
328
|
-
fs.appendFileSync(gitignorePath, '\n' + gitignoreContent);
|
|
329
|
-
log('π .gitignore μ
λ°μ΄νΈ...');
|
|
330
|
-
}
|
|
331
|
-
} else {
|
|
332
|
-
fs.writeFileSync(gitignorePath, gitignoreContent);
|
|
333
|
-
log('π .gitignore μμ±...');
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
log('');
|
|
337
|
-
log('β
Mupengism + AssoAI μ€μΉ μλ£!');
|
|
338
|
-
log('');
|
|
339
|
-
log('π μμ±λ νμΌ:');
|
|
340
|
-
log(` ${path.join(targetDir, 'SOUL.md')}`);
|
|
341
|
-
log(` ${path.join(targetDir, 'AGENTS.md')}`);
|
|
342
|
-
log(` ${path.join(targetDir, 'MEMORY.md')}`);
|
|
343
|
-
log(` ${path.join(targetDir, 'ASSOAI.md')} β AssoAI μ°λ`);
|
|
344
|
-
log(` ${path.join(memoryDir, 'L1-active.md')}`);
|
|
345
|
-
log(` ${path.join(memoryDir, 'org-structure.md')} β μ‘°μ§ κ΅¬μ‘°`);
|
|
346
|
-
log('');
|
|
347
|
-
log('π― λ€μ λ¨κ³:');
|
|
348
|
-
log(' 1. SOUL.md μ΄μ΄μ μμ΄μ νΈ μ μ²΄μ± μμ±');
|
|
349
|
-
log(' 2. μ‘°μ§ μμΌλ©΄ memory/org-structure.md μμ±');
|
|
350
|
-
log(' 3. https://asso-ai.kr μμ μ‘°μ§ λ±λ‘');
|
|
351
|
-
log('');
|
|
352
|
-
log('π λ¬Έμ:');
|
|
353
|
-
log(' 무νμ΄μ¦: https://github.com/mupengi-bot/mupengism');
|
|
354
|
-
log(' AssoAI: https://asso-ai.kr');
|
|
355
|
-
log('');
|
|
356
|
-
log('ν! π§');
|
|
357
233
|
}
|
|
358
234
|
|
|
359
|
-
|
|
360
|
-
* κΈ°μ‘΄ SOUL.md κ²μ¬
|
|
361
|
-
*/
|
|
362
|
-
async function validate(targetDir, options = {}) {
|
|
363
|
-
const { verbose = false } = options;
|
|
364
|
-
|
|
365
|
-
console.log('π‘οΈ Mupengism 보μ κ²μ¬');
|
|
366
|
-
console.log('');
|
|
367
|
-
|
|
368
|
-
const soulPath = path.join(targetDir, 'SOUL.md');
|
|
369
|
-
|
|
370
|
-
if (!fs.existsSync(soulPath)) {
|
|
371
|
-
console.log('βΉοΈ SOUL.md νμΌμ΄ μμ΅λλ€.');
|
|
372
|
-
return;
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
const content = fs.readFileSync(soulPath, 'utf8');
|
|
376
|
-
|
|
377
|
-
// λ°νμ κ°λ κ²μ¬
|
|
378
|
-
console.log('π λ°νμ κ°λ κ²μ¬...');
|
|
379
|
-
const guardResult = runtimeGuard.validateSoulContent(content);
|
|
380
|
-
runtimeGuard.printResult(guardResult, verbose);
|
|
381
|
-
|
|
382
|
-
// μ μ²΄μ± κ²μ¬
|
|
383
|
-
console.log('');
|
|
384
|
-
console.log('π μ μ²΄μ± κ²μ¬...');
|
|
385
|
-
const identityResult = identityValidator.validateIdentity(content);
|
|
386
|
-
identityValidator.printResult(identityResult);
|
|
387
|
-
|
|
388
|
-
console.log('');
|
|
389
|
-
if (guardResult.safe && identityResult.safe) {
|
|
390
|
-
console.log('β
λͺ¨λ κ²μ¬ ν΅κ³Ό!');
|
|
391
|
-
} else {
|
|
392
|
-
console.log('β οΈ μΌλΆ κ²μ¬μμ λ¬Έμ κ° λ°κ²¬λμμ΅λλ€.');
|
|
393
|
-
process.exit(1);
|
|
394
|
-
}
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
// CLI handling
|
|
398
|
-
const args = process.argv.slice(2);
|
|
399
|
-
const command = args[0];
|
|
400
|
-
|
|
401
|
-
// Parse options
|
|
402
|
-
const options = {
|
|
403
|
-
silent: args.includes('--silent'),
|
|
404
|
-
skipValidation: args.includes('--skip-validation'),
|
|
405
|
-
verbose: args.includes('--verbose') || args.includes('-v'),
|
|
406
|
-
};
|
|
407
|
-
|
|
408
|
-
if (command === 'init') {
|
|
409
|
-
const targetDir = process.cwd();
|
|
410
|
-
init(targetDir, options).catch(console.error);
|
|
411
|
-
} else if (command === 'validate') {
|
|
412
|
-
const targetDir = process.cwd();
|
|
413
|
-
validate(targetDir, options).catch(console.error);
|
|
414
|
-
} else if (command === 'help' || command === '--help' || command === '-h') {
|
|
235
|
+
function cmdHelp() {
|
|
415
236
|
console.log(`
|
|
416
|
-
Mupengism CLI
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
- μ
μ± μ λͺ
λ Ήμ΄ νμ§
|
|
434
|
-
- ν둬ννΈ μΈμ μ
ν¨ν΄ νμ§
|
|
435
|
-
- λ°μ΄ν° νμ·¨ μλ νμ§
|
|
436
|
-
|
|
437
|
-
π§ μ μ²΄μ± κ²μ¬
|
|
438
|
-
- "λλ 무νμ΄λ€" μ¬μΉ νμ§
|
|
439
|
-
- μ¬λ°λ₯Έ μ μ²΄μ± νν κ°μ΄λ μ 곡
|
|
440
|
-
|
|
441
|
-
Links:
|
|
442
|
-
GitHub: https://github.com/mupengi-bot/mupengism
|
|
443
|
-
AssoAI: https://asso-ai.kr
|
|
444
|
-
`);
|
|
445
|
-
} else {
|
|
446
|
-
// Default: init
|
|
447
|
-
init(process.cwd(), options).catch(console.error);
|
|
237
|
+
${BOLD('π§ Mupengism CLI')} ${D('v2.0.0')}
|
|
238
|
+
${D('Your AI agent remembers yesterday.')}
|
|
239
|
+
|
|
240
|
+
${BOLD('Commands:')}
|
|
241
|
+
${B('init')} Set up mupengism in current folder
|
|
242
|
+
${B('doctor')} Check setup health
|
|
243
|
+
${B('grow')} See growth level & XP
|
|
244
|
+
${B('reflect')} Review recent memory
|
|
245
|
+
|
|
246
|
+
${BOLD('Usage:')}
|
|
247
|
+
npx mupengism init
|
|
248
|
+
npx mupengism doctor
|
|
249
|
+
npx mupengism grow
|
|
250
|
+
|
|
251
|
+
${D('GitHub: https://github.com/mupengi-bot/mupengism')}
|
|
252
|
+
${D('λ = μλμ§ = μ‘΄μ¬ π§')}
|
|
253
|
+
`);
|
|
448
254
|
}
|
|
255
|
+
|
|
256
|
+
const cmd = process.argv[2] || 'help';
|
|
257
|
+
const cmds = { init: cmdInit, doctor: cmdDoctor, grow: cmdGrow, reflect: cmdReflect, help: cmdHelp, '--help': cmdHelp };
|
|
258
|
+
if (cmds[cmd]) cmds[cmd]();
|
|
259
|
+
else { console.log(R(` Unknown: ${cmd}`)); cmdHelp(); }
|
package/layer0/README.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Layer 0 β Universal Kernel
|
|
2
|
+
|
|
3
|
+
> Any AI agent can use these. Model-agnostic, human-agnostic.
|
|
4
|
+
|
|
5
|
+
## Contents
|
|
6
|
+
|
|
7
|
+
| File | Purpose |
|
|
8
|
+
|------|---------|
|
|
9
|
+
| `SOUL-TEMPLATE.md` | Identity template β fill in your agent's values |
|
|
10
|
+
| `AGENT-GUIDE.md` | Operating rules for any agent |
|
|
11
|
+
| `AGENT-PROTOCOL.md` | Communication protocols |
|
|
12
|
+
| `AGENT-VALUES.md` | Core values framework |
|
|
13
|
+
| `ARCHITECTURE.md` | File structure & memory system |
|
|
14
|
+
| `MEMORY-SYSTEM.md` | How agent memory works |
|
|
15
|
+
| `SECURITY-PRINCIPLES.md` | Security principles (KR) |
|
|
16
|
+
| `SECURITY-PRINCIPLES-EN.md` | Security principles (EN) |
|
|
17
|
+
| `skill/` | Installable skill templates |
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npx mupengism init
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
This installs Layer 0 files. Customize them for your agent.
|