@ekkos/cli 0.2.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/dist/cache/LocalSessionStore.d.ts +129 -0
- package/dist/cache/LocalSessionStore.js +688 -0
- package/dist/cache/capture.d.ts +26 -0
- package/dist/cache/capture.js +461 -0
- package/dist/cache/index.d.ts +7 -0
- package/dist/cache/index.js +23 -0
- package/dist/cache/types.d.ts +147 -0
- package/dist/cache/types.js +40 -0
- package/dist/commands/init.d.ts +9 -0
- package/dist/commands/init.js +478 -0
- package/dist/commands/run.d.ts +12 -0
- package/dist/commands/run.js +829 -0
- package/dist/commands/setup.d.ts +6 -0
- package/dist/commands/setup.js +658 -0
- package/dist/commands/status.d.ts +1 -0
- package/dist/commands/status.js +109 -0
- package/dist/commands/test.d.ts +1 -0
- package/dist/commands/test.js +157 -0
- package/dist/deploy/agents.d.ts +15 -0
- package/dist/deploy/agents.js +72 -0
- package/dist/deploy/hooks.d.ts +16 -0
- package/dist/deploy/hooks.js +121 -0
- package/dist/deploy/index.d.ts +7 -0
- package/dist/deploy/index.js +24 -0
- package/dist/deploy/instructions.d.ts +12 -0
- package/dist/deploy/instructions.js +36 -0
- package/dist/deploy/mcp.d.ts +19 -0
- package/dist/deploy/mcp.js +109 -0
- package/dist/deploy/plugins.d.ts +19 -0
- package/dist/deploy/plugins.js +62 -0
- package/dist/deploy/settings.d.ts +8 -0
- package/dist/deploy/settings.js +84 -0
- package/dist/deploy/skills.d.ts +19 -0
- package/dist/deploy/skills.js +60 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +71 -0
- package/dist/restore/RestoreOrchestrator.d.ts +48 -0
- package/dist/restore/RestoreOrchestrator.js +481 -0
- package/dist/restore/index.d.ts +4 -0
- package/dist/restore/index.js +20 -0
- package/dist/utils/platform.d.ts +29 -0
- package/dist/utils/platform.js +65 -0
- package/dist/utils/session-words.json +119 -0
- package/dist/utils/state.d.ts +57 -0
- package/dist/utils/state.js +186 -0
- package/dist/utils/templates.d.ts +24 -0
- package/dist/utils/templates.js +118 -0
- package/package.json +48 -0
- package/templates/CLAUDE.md +287 -0
- package/templates/README.md +378 -0
- package/templates/agents/README.md +182 -0
- package/templates/agents/code-reviewer.md +166 -0
- package/templates/agents/debug-detective.md +169 -0
- package/templates/agents/ekkOS_Vercel.md +99 -0
- package/templates/agents/extension-manager.md +229 -0
- package/templates/agents/git-companion.md +185 -0
- package/templates/agents/github-test-agent.md +321 -0
- package/templates/agents/railway-manager.md +179 -0
- package/templates/claude-plugins/PHASE2_COMPLETION.md +346 -0
- package/templates/claude-plugins/PLUGIN_PROPOSALS.md +1776 -0
- package/templates/claude-plugins/README.md +587 -0
- package/templates/claude-plugins/agents/code-reviewer.json +14 -0
- package/templates/claude-plugins/agents/debug-detective.json +15 -0
- package/templates/claude-plugins/agents/git-companion.json +14 -0
- package/templates/claude-plugins/blog-manager/.claude-plugin/plugin.json +8 -0
- package/templates/claude-plugins/blog-manager/commands/blog.md +691 -0
- package/templates/claude-plugins/golden-loop-monitor/.claude-plugin/plugin.json +8 -0
- package/templates/claude-plugins/golden-loop-monitor/commands/loop-status.md +434 -0
- package/templates/claude-plugins/learning-tracker/.claude-plugin/plugin.json +8 -0
- package/templates/claude-plugins/learning-tracker/commands/my-patterns.md +282 -0
- package/templates/claude-plugins/memory-lens/.claude-plugin/plugin.json +8 -0
- package/templates/claude-plugins/memory-lens/commands/memory-search.md +181 -0
- package/templates/claude-plugins/pattern-coach/.claude-plugin/plugin.json +8 -0
- package/templates/claude-plugins/pattern-coach/commands/forge.md +365 -0
- package/templates/claude-plugins/project-schema-validator/.claude-plugin/plugin.json +8 -0
- package/templates/claude-plugins/project-schema-validator/commands/validate-schema.md +582 -0
- package/templates/claude-plugins-admin/AGENT_TEAM_PROPOSALS.md +819 -0
- package/templates/claude-plugins-admin/README.md +446 -0
- package/templates/claude-plugins-admin/autonomous-admin-agent/.claude-plugin/plugin.json +8 -0
- package/templates/claude-plugins-admin/autonomous-admin-agent/commands/agent.md +595 -0
- package/templates/claude-plugins-admin/backend-agent/.claude-plugin/plugin.json +8 -0
- package/templates/claude-plugins-admin/backend-agent/commands/backend.md +798 -0
- package/templates/claude-plugins-admin/deploy-guardian/.claude-plugin/plugin.json +8 -0
- package/templates/claude-plugins-admin/deploy-guardian/commands/deploy.md +554 -0
- package/templates/claude-plugins-admin/frontend-agent/.claude-plugin/plugin.json +8 -0
- package/templates/claude-plugins-admin/frontend-agent/commands/frontend.md +881 -0
- package/templates/claude-plugins-admin/mcp-server-manager/.claude-plugin/plugin.json +8 -0
- package/templates/claude-plugins-admin/mcp-server-manager/commands/mcp.md +85 -0
- package/templates/claude-plugins-admin/memory-system-monitor/.claude-plugin/plugin.json +8 -0
- package/templates/claude-plugins-admin/memory-system-monitor/commands/memory-health.md +569 -0
- package/templates/claude-plugins-admin/qa-agent/.claude-plugin/plugin.json +8 -0
- package/templates/claude-plugins-admin/qa-agent/commands/qa.md +863 -0
- package/templates/claude-plugins-admin/tech-lead-agent/.claude-plugin/plugin.json +8 -0
- package/templates/claude-plugins-admin/tech-lead-agent/commands/lead.md +732 -0
- package/templates/commands/continue.md +47 -0
- package/templates/cursor-hooks/after-agent-response.sh +117 -0
- package/templates/cursor-hooks/before-submit-prompt.sh +419 -0
- package/templates/cursor-hooks/hooks.json +20 -0
- package/templates/cursor-hooks/lib/contract.sh +320 -0
- package/templates/cursor-hooks/stop.sh +75 -0
- package/templates/cursor-rules/ekkos-memory.md +187 -0
- package/templates/hooks/assistant-response.sh +96 -0
- package/templates/hooks/hooks.json +28 -0
- package/templates/hooks/lib/contract.sh +320 -0
- package/templates/hooks/lib/state.sh +158 -0
- package/templates/hooks/session-start.ps1 +41 -0
- package/templates/hooks/session-start.sh +318 -0
- package/templates/hooks/stop.ps1 +16 -0
- package/templates/hooks/stop.sh +989 -0
- package/templates/hooks/user-prompt-submit.ps1 +174 -0
- package/templates/hooks/user-prompt-submit.sh +587 -0
- package/templates/hooks-node/lib/state.js +187 -0
- package/templates/hooks-node/stop.js +416 -0
- package/templates/hooks-node/user-prompt-submit.js +337 -0
- package/templates/plan-template.md +306 -0
- package/templates/rules/00-hooks-contract.mdc +89 -0
- package/templates/rules/30-ekkos-core.mdc +188 -0
- package/templates/rules/31-ekkos-messages.mdc +78 -0
- package/templates/skills/continue/SKILL.md +169 -0
- package/templates/skills/ekkOS_Deep_Recall/Skill.md +282 -0
- package/templates/skills/ekkOS_Learn/Skill.md +265 -0
- package/templates/skills/ekkOS_Memory_First/Skill.md +206 -0
- package/templates/skills/ekkOS_Plan_Assist/Skill.md +302 -0
- package/templates/skills/ekkOS_Preferences/Skill.md +247 -0
- package/templates/skills/ekkOS_Reflect/Skill.md +257 -0
- package/templates/skills/ekkOS_Safety/Skill.md +265 -0
- package/templates/skills/ekkOS_Schema/Skill.md +251 -0
- package/templates/skills/ekkOS_Summary/Skill.md +257 -0
- package/templates/skills/ekkOS_Vault/Skill.md +287 -0
- package/templates/skills/permissions/Skill.md +322 -0
- package/templates/spec-template.md +159 -0
- package/templates/windsurf-hooks/before-submit-prompt.sh +238 -0
- package/templates/windsurf-hooks/hooks.json +10 -0
- package/templates/windsurf-hooks/lib/contract.sh +320 -0
- package/templates/windsurf-rules/ekkos-memory.md +129 -0
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
{
|
|
2
|
+
"adjectives": [
|
|
3
|
+
"turbo", "mega", "hyper", "ultra", "super", "cosmic", "atomic", "quantum",
|
|
4
|
+
"stellar", "epic", "mighty", "zippy", "rapid", "swift", "brisk",
|
|
5
|
+
"hasty", "quick", "snappy", "speedy", "vivid",
|
|
6
|
+
"happy", "jolly", "merry", "cheerful", "bright", "sunny", "golden", "shiny",
|
|
7
|
+
"gleaming", "radiant", "glowing", "beaming", "sparkling", "dazzling", "brilliant",
|
|
8
|
+
"vibrant", "lively", "perky", "peppy", "bouncy",
|
|
9
|
+
"groovy", "jazzy", "funky", "zesty", "spicy", "crispy", "fluffy", "bubbly",
|
|
10
|
+
"fizzy", "sparkly", "chunky", "sassy", "quirky", "wacky", "zany",
|
|
11
|
+
"silly", "goofy", "witty", "clever", "punchy",
|
|
12
|
+
"slick", "sleek", "smooth", "polished", "refined", "elegant", "fancy", "dapper",
|
|
13
|
+
"stylish", "chic", "classy", "posh", "swanky", "ritzy", "plush",
|
|
14
|
+
"luxe", "deluxe", "premium", "elite", "prime",
|
|
15
|
+
"cyber", "digital", "binary", "pixel", "vector", "matrix", "neural", "quantum",
|
|
16
|
+
"crypto", "techno", "electric", "ionic", "plasma", "laser", "photon",
|
|
17
|
+
"nano", "micro", "giga", "mega", "tera",
|
|
18
|
+
"solar", "lunar", "cosmic", "stellar", "nebula", "aurora", "crystal", "prism",
|
|
19
|
+
"frost", "icy", "frozen", "arctic", "polar", "alpine", "misty",
|
|
20
|
+
"foggy", "hazy", "cloudy", "stormy", "windy",
|
|
21
|
+
"crimson", "scarlet", "ruby", "amber", "golden", "lime", "jade", "teal",
|
|
22
|
+
"azure", "cobalt", "violet", "purple", "magenta", "coral", "peach",
|
|
23
|
+
"bronze", "silver", "chrome", "onyx", "pearl",
|
|
24
|
+
"bold", "brave", "keen", "noble", "royal", "regal", "majestic", "grand",
|
|
25
|
+
"proud", "fierce", "wild", "free", "pure", "true", "real",
|
|
26
|
+
"honest", "loyal", "trusty", "sturdy", "solid",
|
|
27
|
+
"tiny", "mini", "micro", "petite", "small", "compact", "cozy", "snug",
|
|
28
|
+
"large", "huge", "giant", "massive", "grand", "vast", "broad",
|
|
29
|
+
"wide", "tall", "long", "big", "great",
|
|
30
|
+
"alpha", "beta", "gamma", "delta", "epsilon", "zeta", "eta", "theta",
|
|
31
|
+
"iota", "kappa", "lambda", "omega", "sigma", "tau", "phi",
|
|
32
|
+
"chi", "psi", "rho", "nu", "xi",
|
|
33
|
+
"metal", "steel", "iron", "copper", "bronze", "brass", "titanium", "platinum",
|
|
34
|
+
"diamond", "crystal", "glass", "marble", "granite", "stone", "wood",
|
|
35
|
+
"oak", "pine", "cedar", "bamboo", "silk", "velvet", "cotton", "wool",
|
|
36
|
+
"leather", "rubber", "plastic", "ceramic", "porcelain", "clay", "adobe",
|
|
37
|
+
"striped", "dotted", "spotted", "checked", "plaid", "solid", "gradient", "faded",
|
|
38
|
+
"mottled", "marbled", "speckled", "flecked", "dappled", "tinted", "shaded",
|
|
39
|
+
"frosted", "glazed", "painted", "carved", "etched"
|
|
40
|
+
],
|
|
41
|
+
"nouns": [
|
|
42
|
+
"penguin", "panda", "otter", "narwhal", "alpaca", "llama", "badger", "walrus",
|
|
43
|
+
"koala", "dolphin", "eagle", "falcon", "hawk", "raven", "owl",
|
|
44
|
+
"fox", "wolf", "bear", "tiger", "lion", "leopard", "panther",
|
|
45
|
+
"ferret", "gopher", "bobcat", "lynx", "cougar", "jaguar", "cheetah",
|
|
46
|
+
"elephant", "rhino", "hippo", "giraffe", "zebra", "bison", "moose",
|
|
47
|
+
"deer", "elk", "caribou", "antelope",
|
|
48
|
+
"waffle", "pickle", "noodle", "pretzel", "muffin", "taco", "nugget", "biscuit",
|
|
49
|
+
"donut", "bagel", "croissant", "scone", "danish", "turnover", "strudel",
|
|
50
|
+
"pizza", "burger", "hotdog", "sandwich", "wrap", "burrito", "quesadilla",
|
|
51
|
+
"nachos", "taco", "falafel", "gyro", "kebab", "samosa", "dumpling",
|
|
52
|
+
"ramen", "sushi", "tempura", "teriyaki", "miso", "udon", "soba",
|
|
53
|
+
"pasta", "ravioli", "gnocchi", "risotto",
|
|
54
|
+
"rocket", "comet", "nebula", "quasar", "meteor", "photon", "pulsar", "nova",
|
|
55
|
+
"supernova", "galaxy", "cosmos", "universe", "orbit", "asteroid", "planet",
|
|
56
|
+
"star", "moon", "sun", "eclipse", "solstice", "equinox", "aurora",
|
|
57
|
+
"constellation", "satellite", "probe", "shuttle", "capsule", "lander", "rover",
|
|
58
|
+
"beacon", "signal", "transmission", "relay", "array", "dish", "antenna",
|
|
59
|
+
"spectrum", "frequency", "wavelength", "radiation",
|
|
60
|
+
"ninja", "pirate", "wizard", "robot", "cyborg", "android", "knight", "warrior",
|
|
61
|
+
"samurai", "ronin", "monk", "sage", "oracle", "prophet", "seer",
|
|
62
|
+
"mage", "sorcerer", "warlock", "witch", "druid", "shaman", "mystic",
|
|
63
|
+
"hero", "champion", "legend", "titan", "colossus", "golem", "giant",
|
|
64
|
+
"sprite", "fairy", "pixie", "elf", "dwarf", "gnome", "goblin",
|
|
65
|
+
"dragon", "phoenix", "griffin", "sphinx",
|
|
66
|
+
"thunder", "lightning", "blizzard", "tornado", "hurricane", "cyclone", "typhoon", "monsoon",
|
|
67
|
+
"tempest", "storm", "gale", "breeze", "wind", "gust", "draft",
|
|
68
|
+
"rain", "drizzle", "shower", "downpour", "deluge", "flood", "torrent",
|
|
69
|
+
"snow", "sleet", "hail", "frost", "ice", "icicle", "glacier",
|
|
70
|
+
"fog", "mist", "haze", "cloud", "vapor", "steam", "smoke",
|
|
71
|
+
"dew", "droplet", "bubble", "sparkle",
|
|
72
|
+
"server", "laptop", "tablet", "phone", "screen", "keyboard", "mouse", "chip",
|
|
73
|
+
"processor", "memory", "drive", "disk", "cache", "buffer", "stack",
|
|
74
|
+
"queue", "thread", "process", "daemon", "kernel", "module", "plugin",
|
|
75
|
+
"widget", "gadget", "device", "sensor", "scanner", "printer", "router", "modem",
|
|
76
|
+
"guitar", "piano", "drums", "flute", "violin", "trumpet", "saxophone", "clarinet",
|
|
77
|
+
"trombone", "harp", "banjo", "ukulele", "cello", "viola", "bass",
|
|
78
|
+
"synthesizer", "organ", "accordion", "harmonica", "xylophone"
|
|
79
|
+
],
|
|
80
|
+
"verbs": [
|
|
81
|
+
"runs", "walks", "jumps", "hops", "skips", "leaps", "bounds", "dashes",
|
|
82
|
+
"races", "sprints", "zooms", "zips", "flies", "soars", "glides",
|
|
83
|
+
"floats", "drifts", "swims", "dives", "surfs", "rides", "sails",
|
|
84
|
+
"climbs", "scales", "ascends", "descends", "slides", "slips", "rolls",
|
|
85
|
+
"spins", "twirls", "whirls", "rotates", "orbits", "circles", "loops",
|
|
86
|
+
"bounces", "springs", "vaults", "launches",
|
|
87
|
+
"builds", "creates", "makes", "crafts", "forges", "shapes", "molds", "forms",
|
|
88
|
+
"designs", "draws", "paints", "sketches", "writes", "codes", "types",
|
|
89
|
+
"clicks", "taps", "swipes", "scrolls", "drags", "drops", "picks",
|
|
90
|
+
"grabs", "holds", "carries", "lifts", "throws", "catches", "tosses",
|
|
91
|
+
"pushes", "pulls", "moves", "shifts", "slides", "turns", "flips",
|
|
92
|
+
"spins", "rotates", "twists", "bends",
|
|
93
|
+
"talks", "speaks", "says", "tells", "asks", "answers", "replies", "responds",
|
|
94
|
+
"shouts", "yells", "screams", "whispers", "murmurs", "mutters", "hums",
|
|
95
|
+
"sings", "chants", "calls", "cries", "laughs", "giggles", "chuckles",
|
|
96
|
+
"smiles", "grins", "beams", "glows", "shines", "sparkles", "glitters",
|
|
97
|
+
"blinks", "winks", "nods", "waves", "signals", "points", "gestures",
|
|
98
|
+
"shows", "reveals", "displays", "presents",
|
|
99
|
+
"thinks", "ponders", "wonders", "considers", "reflects", "meditates", "contemplates", "muses",
|
|
100
|
+
"dreams", "imagines", "envisions", "pictures", "visualizes", "sees", "views",
|
|
101
|
+
"watches", "observes", "notices", "spots", "finds", "discovers", "detects",
|
|
102
|
+
"learns", "studies", "reads", "explores", "investigates", "examines", "analyzes",
|
|
103
|
+
"solves", "figures", "calculates", "computes", "measures", "counts", "tallies",
|
|
104
|
+
"remembers", "recalls", "recollects", "recognizes",
|
|
105
|
+
"wins", "succeeds", "achieves", "accomplishes", "completes", "finishes", "conquers", "triumphs",
|
|
106
|
+
"celebrates", "cheers", "rejoices", "delights", "enjoys", "loves", "adores",
|
|
107
|
+
"helps", "aids", "assists", "supports", "guides", "leads", "directs",
|
|
108
|
+
"protects", "guards", "defends", "shields", "saves", "rescues", "recovers",
|
|
109
|
+
"heals", "fixes", "repairs", "restores", "renews", "refreshes", "revives",
|
|
110
|
+
"thrives", "grows", "blooms", "flourishes",
|
|
111
|
+
"compiles", "deploys", "merges", "commits", "pushes", "pulls", "clones", "forks",
|
|
112
|
+
"branches", "tags", "releases", "patches", "updates", "upgrades", "installs",
|
|
113
|
+
"uninstalls", "configures", "optimizes", "debugs", "tests", "validates", "verifies",
|
|
114
|
+
"authenticates", "authorizes", "encrypts", "decrypts", "compresses", "decompresses", "archives", "extracts",
|
|
115
|
+
"invents", "innovates", "improvises", "experiments", "discovers", "pioneers", "explores", "ventures",
|
|
116
|
+
"adapts", "evolves", "transforms", "revolutionizes", "reimagines", "redefines", "reinvents",
|
|
117
|
+
"generates", "synthesizes", "composes", "orchestrates", "choreographs"
|
|
118
|
+
]
|
|
119
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export declare const EKKOS_DIR: string;
|
|
2
|
+
export declare const STATE_FILE: string;
|
|
3
|
+
export declare const AUTO_CLEAR_FLAG: string;
|
|
4
|
+
export declare const CONFIG_FILE: string;
|
|
5
|
+
export interface EkkosState {
|
|
6
|
+
sessionName: string;
|
|
7
|
+
sessionId: string;
|
|
8
|
+
turnNumber: number;
|
|
9
|
+
lastUpdated: string;
|
|
10
|
+
projectPath: string;
|
|
11
|
+
}
|
|
12
|
+
export interface EkkosConfig {
|
|
13
|
+
hookApiKey?: string;
|
|
14
|
+
apiKey?: string;
|
|
15
|
+
userId?: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Convert UUID to memorable 3-word name (adj-noun-verb)
|
|
19
|
+
* Deterministic: same UUID always produces same name
|
|
20
|
+
*/
|
|
21
|
+
export declare function uuidToWords(uuid: string): string;
|
|
22
|
+
/**
|
|
23
|
+
* Ensure .ekkos directory exists
|
|
24
|
+
*/
|
|
25
|
+
export declare function ensureEkkosDir(): void;
|
|
26
|
+
/**
|
|
27
|
+
* Get current session state
|
|
28
|
+
*/
|
|
29
|
+
export declare function getState(): EkkosState | null;
|
|
30
|
+
/**
|
|
31
|
+
* Update session state
|
|
32
|
+
*/
|
|
33
|
+
export declare function updateState(updates: Partial<EkkosState>): EkkosState;
|
|
34
|
+
/**
|
|
35
|
+
* Get current session name
|
|
36
|
+
*/
|
|
37
|
+
export declare function getCurrentSessionName(): string | null;
|
|
38
|
+
/**
|
|
39
|
+
* Get ekkOS config
|
|
40
|
+
*/
|
|
41
|
+
export declare function getConfig(): EkkosConfig | null;
|
|
42
|
+
/**
|
|
43
|
+
* Get auth token from config
|
|
44
|
+
*/
|
|
45
|
+
export declare function getAuthToken(): string | null;
|
|
46
|
+
/**
|
|
47
|
+
* Clear auto-clear flag file
|
|
48
|
+
*/
|
|
49
|
+
export declare function clearAutoClearFlag(): void;
|
|
50
|
+
/**
|
|
51
|
+
* Parse auto-clear flag file
|
|
52
|
+
*/
|
|
53
|
+
export declare function parseAutoClearFlag(): {
|
|
54
|
+
percent: number;
|
|
55
|
+
session: string;
|
|
56
|
+
timestamp: number;
|
|
57
|
+
} | null;
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.CONFIG_FILE = exports.AUTO_CLEAR_FLAG = exports.STATE_FILE = exports.EKKOS_DIR = void 0;
|
|
40
|
+
exports.uuidToWords = uuidToWords;
|
|
41
|
+
exports.ensureEkkosDir = ensureEkkosDir;
|
|
42
|
+
exports.getState = getState;
|
|
43
|
+
exports.updateState = updateState;
|
|
44
|
+
exports.getCurrentSessionName = getCurrentSessionName;
|
|
45
|
+
exports.getConfig = getConfig;
|
|
46
|
+
exports.getAuthToken = getAuthToken;
|
|
47
|
+
exports.clearAutoClearFlag = clearAutoClearFlag;
|
|
48
|
+
exports.parseAutoClearFlag = parseAutoClearFlag;
|
|
49
|
+
const fs = __importStar(require("fs"));
|
|
50
|
+
const path = __importStar(require("path"));
|
|
51
|
+
const os = __importStar(require("os"));
|
|
52
|
+
// State file paths
|
|
53
|
+
exports.EKKOS_DIR = path.join(os.homedir(), '.ekkos');
|
|
54
|
+
exports.STATE_FILE = path.join(exports.EKKOS_DIR, 'state.json');
|
|
55
|
+
exports.AUTO_CLEAR_FLAG = path.join(exports.EKKOS_DIR, 'auto-clear.flag');
|
|
56
|
+
exports.CONFIG_FILE = path.join(exports.EKKOS_DIR, 'config.json');
|
|
57
|
+
// SINGLE SOURCE OF TRUTH: Import word lists from shared JSON
|
|
58
|
+
// Must match: apps/web, apps/memory, .claude/hooks
|
|
59
|
+
const session_words_json_1 = __importDefault(require("./session-words.json"));
|
|
60
|
+
const ADJECTIVES = session_words_json_1.default.adjectives;
|
|
61
|
+
const NOUNS = session_words_json_1.default.nouns;
|
|
62
|
+
const VERBS = session_words_json_1.default.verbs;
|
|
63
|
+
/**
|
|
64
|
+
* Convert UUID to memorable 3-word name (adj-noun-verb)
|
|
65
|
+
* Deterministic: same UUID always produces same name
|
|
66
|
+
*/
|
|
67
|
+
function uuidToWords(uuid) {
|
|
68
|
+
// Remove dashes and take first 12 hex chars
|
|
69
|
+
const hex = uuid.replace(/-/g, '').slice(0, 12);
|
|
70
|
+
if (!/^[0-9a-fA-F]+$/.test(hex)) {
|
|
71
|
+
return 'unknown-session-starts';
|
|
72
|
+
}
|
|
73
|
+
// Use different 4-char segments for each word
|
|
74
|
+
const adjSeed = parseInt(hex.slice(0, 4), 16);
|
|
75
|
+
const nounSeed = parseInt(hex.slice(4, 8), 16);
|
|
76
|
+
const verbSeed = parseInt(hex.slice(8, 12), 16);
|
|
77
|
+
const adjIdx = adjSeed % ADJECTIVES.length;
|
|
78
|
+
const nounIdx = nounSeed % NOUNS.length;
|
|
79
|
+
const verbIdx = verbSeed % VERBS.length;
|
|
80
|
+
return `${ADJECTIVES[adjIdx]}-${NOUNS[nounIdx]}-${VERBS[verbIdx]}`;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Ensure .ekkos directory exists
|
|
84
|
+
*/
|
|
85
|
+
function ensureEkkosDir() {
|
|
86
|
+
if (!fs.existsSync(exports.EKKOS_DIR)) {
|
|
87
|
+
fs.mkdirSync(exports.EKKOS_DIR, { recursive: true });
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Get current session state
|
|
92
|
+
*/
|
|
93
|
+
function getState() {
|
|
94
|
+
try {
|
|
95
|
+
if (fs.existsSync(exports.STATE_FILE)) {
|
|
96
|
+
const content = fs.readFileSync(exports.STATE_FILE, 'utf-8');
|
|
97
|
+
return JSON.parse(content);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
catch {
|
|
101
|
+
// Ignore errors
|
|
102
|
+
}
|
|
103
|
+
return null;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Update session state
|
|
107
|
+
*/
|
|
108
|
+
function updateState(updates) {
|
|
109
|
+
ensureEkkosDir();
|
|
110
|
+
const current = getState() || {
|
|
111
|
+
sessionName: '',
|
|
112
|
+
sessionId: '',
|
|
113
|
+
turnNumber: 0,
|
|
114
|
+
lastUpdated: '',
|
|
115
|
+
projectPath: process.cwd()
|
|
116
|
+
};
|
|
117
|
+
const newState = {
|
|
118
|
+
...current,
|
|
119
|
+
...updates,
|
|
120
|
+
lastUpdated: new Date().toISOString()
|
|
121
|
+
};
|
|
122
|
+
fs.writeFileSync(exports.STATE_FILE, JSON.stringify(newState, null, 2));
|
|
123
|
+
return newState;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Get current session name
|
|
127
|
+
*/
|
|
128
|
+
function getCurrentSessionName() {
|
|
129
|
+
const state = getState();
|
|
130
|
+
return state?.sessionName || null;
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Get ekkOS config
|
|
134
|
+
*/
|
|
135
|
+
function getConfig() {
|
|
136
|
+
try {
|
|
137
|
+
if (fs.existsSync(exports.CONFIG_FILE)) {
|
|
138
|
+
const content = fs.readFileSync(exports.CONFIG_FILE, 'utf-8');
|
|
139
|
+
return JSON.parse(content);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
catch {
|
|
143
|
+
// Ignore errors
|
|
144
|
+
}
|
|
145
|
+
return null;
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Get auth token from config
|
|
149
|
+
*/
|
|
150
|
+
function getAuthToken() {
|
|
151
|
+
const config = getConfig();
|
|
152
|
+
return config?.hookApiKey || config?.apiKey || null;
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Clear auto-clear flag file
|
|
156
|
+
*/
|
|
157
|
+
function clearAutoClearFlag() {
|
|
158
|
+
try {
|
|
159
|
+
if (fs.existsSync(exports.AUTO_CLEAR_FLAG)) {
|
|
160
|
+
fs.unlinkSync(exports.AUTO_CLEAR_FLAG);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
catch {
|
|
164
|
+
// Ignore errors
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Parse auto-clear flag file
|
|
169
|
+
*/
|
|
170
|
+
function parseAutoClearFlag() {
|
|
171
|
+
try {
|
|
172
|
+
if (fs.existsSync(exports.AUTO_CLEAR_FLAG)) {
|
|
173
|
+
const content = fs.readFileSync(exports.AUTO_CLEAR_FLAG, 'utf-8').trim();
|
|
174
|
+
const [percent, session, timestamp] = content.split(':');
|
|
175
|
+
return {
|
|
176
|
+
percent: parseInt(percent, 10),
|
|
177
|
+
session: session || 'unknown',
|
|
178
|
+
timestamp: parseInt(timestamp, 10) || Date.now() / 1000
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
catch {
|
|
183
|
+
// Ignore errors
|
|
184
|
+
}
|
|
185
|
+
return null;
|
|
186
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get the path to a template file or directory
|
|
3
|
+
*/
|
|
4
|
+
export declare function getTemplatePath(...paths: string[]): string;
|
|
5
|
+
/**
|
|
6
|
+
* Check if templates exist
|
|
7
|
+
*/
|
|
8
|
+
export declare function templatesExist(): boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Read a template file
|
|
11
|
+
*/
|
|
12
|
+
export declare function readTemplate(relativePath: string): string;
|
|
13
|
+
/**
|
|
14
|
+
* Copy a single file, creating parent directories as needed
|
|
15
|
+
*/
|
|
16
|
+
export declare function copyTemplateFile(templatePath: string, destPath: string, transform?: (content: string) => string): void;
|
|
17
|
+
/**
|
|
18
|
+
* Recursively copy a directory of templates
|
|
19
|
+
*/
|
|
20
|
+
export declare function copyTemplateDir(templateDir: string, destDir: string, transform?: (content: string, filePath: string) => string): number;
|
|
21
|
+
/**
|
|
22
|
+
* List template directories (for skills, agents, plugins)
|
|
23
|
+
*/
|
|
24
|
+
export declare function listTemplateDirs(templateDir: string): string[];
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getTemplatePath = getTemplatePath;
|
|
4
|
+
exports.templatesExist = templatesExist;
|
|
5
|
+
exports.readTemplate = readTemplate;
|
|
6
|
+
exports.copyTemplateFile = copyTemplateFile;
|
|
7
|
+
exports.copyTemplateDir = copyTemplateDir;
|
|
8
|
+
exports.listTemplateDirs = listTemplateDirs;
|
|
9
|
+
const path_1 = require("path");
|
|
10
|
+
const fs_1 = require("fs");
|
|
11
|
+
const platform_1 = require("./platform");
|
|
12
|
+
// Templates directory (symlinked to shared /templates/)
|
|
13
|
+
const TEMPLATES_DIR = (0, path_1.join)((0, path_1.dirname)((0, path_1.dirname)(__dirname)), 'templates');
|
|
14
|
+
/**
|
|
15
|
+
* Get the path to a template file or directory
|
|
16
|
+
*/
|
|
17
|
+
function getTemplatePath(...paths) {
|
|
18
|
+
return (0, path_1.join)(TEMPLATES_DIR, ...paths);
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Check if templates exist
|
|
22
|
+
*/
|
|
23
|
+
function templatesExist() {
|
|
24
|
+
return (0, fs_1.existsSync)(TEMPLATES_DIR) && (0, fs_1.existsSync)(getTemplatePath('hooks'));
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Read a template file
|
|
28
|
+
*/
|
|
29
|
+
function readTemplate(relativePath) {
|
|
30
|
+
const fullPath = getTemplatePath(relativePath);
|
|
31
|
+
if (!(0, fs_1.existsSync)(fullPath)) {
|
|
32
|
+
throw new Error(`Template not found: ${relativePath}`);
|
|
33
|
+
}
|
|
34
|
+
return (0, fs_1.readFileSync)(fullPath, 'utf-8');
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Copy a single file, creating parent directories as needed
|
|
38
|
+
*/
|
|
39
|
+
function copyTemplateFile(templatePath, destPath, transform) {
|
|
40
|
+
const sourcePath = getTemplatePath(templatePath);
|
|
41
|
+
if (!(0, fs_1.existsSync)(sourcePath)) {
|
|
42
|
+
throw new Error(`Template not found: ${templatePath}`);
|
|
43
|
+
}
|
|
44
|
+
// Ensure destination directory exists
|
|
45
|
+
const destDir = (0, path_1.dirname)(destPath);
|
|
46
|
+
if (!(0, fs_1.existsSync)(destDir)) {
|
|
47
|
+
(0, fs_1.mkdirSync)(destDir, { recursive: true });
|
|
48
|
+
}
|
|
49
|
+
if (transform) {
|
|
50
|
+
// Read, transform, and write
|
|
51
|
+
let content = (0, fs_1.readFileSync)(sourcePath, 'utf-8');
|
|
52
|
+
content = transform(content);
|
|
53
|
+
(0, fs_1.writeFileSync)(destPath, content);
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
// Direct copy
|
|
57
|
+
(0, fs_1.copyFileSync)(sourcePath, destPath);
|
|
58
|
+
}
|
|
59
|
+
// Make shell scripts executable on Unix
|
|
60
|
+
if (!platform_1.isWindows && destPath.endsWith('.sh')) {
|
|
61
|
+
(0, fs_1.chmodSync)(destPath, '755');
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Recursively copy a directory of templates
|
|
66
|
+
*/
|
|
67
|
+
function copyTemplateDir(templateDir, destDir, transform) {
|
|
68
|
+
const sourcePath = getTemplatePath(templateDir);
|
|
69
|
+
if (!(0, fs_1.existsSync)(sourcePath)) {
|
|
70
|
+
throw new Error(`Template directory not found: ${templateDir}`);
|
|
71
|
+
}
|
|
72
|
+
if (!(0, fs_1.existsSync)(destDir)) {
|
|
73
|
+
(0, fs_1.mkdirSync)(destDir, { recursive: true });
|
|
74
|
+
}
|
|
75
|
+
let fileCount = 0;
|
|
76
|
+
const entries = (0, fs_1.readdirSync)(sourcePath);
|
|
77
|
+
for (const entry of entries) {
|
|
78
|
+
// Skip hidden files like .DS_Store
|
|
79
|
+
if (entry.startsWith('.'))
|
|
80
|
+
continue;
|
|
81
|
+
const sourceEntry = (0, path_1.join)(sourcePath, entry);
|
|
82
|
+
const destEntry = (0, path_1.join)(destDir, entry);
|
|
83
|
+
const stat = (0, fs_1.statSync)(sourceEntry);
|
|
84
|
+
if (stat.isDirectory()) {
|
|
85
|
+
// Recurse into subdirectory
|
|
86
|
+
fileCount += copyTemplateDir((0, path_1.join)(templateDir, entry), destEntry, transform);
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
// Copy file
|
|
90
|
+
if (transform) {
|
|
91
|
+
let content = (0, fs_1.readFileSync)(sourceEntry, 'utf-8');
|
|
92
|
+
content = transform(content, entry);
|
|
93
|
+
(0, fs_1.writeFileSync)(destEntry, content);
|
|
94
|
+
}
|
|
95
|
+
else {
|
|
96
|
+
(0, fs_1.copyFileSync)(sourceEntry, destEntry);
|
|
97
|
+
}
|
|
98
|
+
// Make shell scripts executable
|
|
99
|
+
if (!platform_1.isWindows && entry.endsWith('.sh')) {
|
|
100
|
+
(0, fs_1.chmodSync)(destEntry, '755');
|
|
101
|
+
}
|
|
102
|
+
fileCount++;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
return fileCount;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* List template directories (for skills, agents, plugins)
|
|
109
|
+
*/
|
|
110
|
+
function listTemplateDirs(templateDir) {
|
|
111
|
+
const sourcePath = getTemplatePath(templateDir);
|
|
112
|
+
if (!(0, fs_1.existsSync)(sourcePath)) {
|
|
113
|
+
return [];
|
|
114
|
+
}
|
|
115
|
+
return (0, fs_1.readdirSync)(sourcePath)
|
|
116
|
+
.filter(entry => !entry.startsWith('.'))
|
|
117
|
+
.filter(entry => (0, fs_1.statSync)((0, path_1.join)(sourcePath, entry)).isDirectory());
|
|
118
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ekkos/cli",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Setup ekkOS memory for AI coding assistants (Claude Code, Cursor, Windsurf)",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"bin": {
|
|
7
|
+
"ekkos": "dist/index.js",
|
|
8
|
+
"ekkos-capture": "dist/cache/capture.js"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"build": "tsc",
|
|
12
|
+
"dev": "ts-node src/index.ts",
|
|
13
|
+
"prepack": "node scripts/build-templates.js prepack",
|
|
14
|
+
"postpack": "node scripts/build-templates.js postpack",
|
|
15
|
+
"prepublishOnly": "npm run build"
|
|
16
|
+
},
|
|
17
|
+
"keywords": [
|
|
18
|
+
"ekkos",
|
|
19
|
+
"ai",
|
|
20
|
+
"memory",
|
|
21
|
+
"claude-code",
|
|
22
|
+
"cursor",
|
|
23
|
+
"windsurf",
|
|
24
|
+
"mcp",
|
|
25
|
+
"anthropic"
|
|
26
|
+
],
|
|
27
|
+
"author": "ekkOS",
|
|
28
|
+
"license": "MIT",
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"chalk": "^5.3.0",
|
|
31
|
+
"commander": "^12.1.0",
|
|
32
|
+
"inquirer": "^9.2.23",
|
|
33
|
+
"node-pty": "1.2.0-beta.7",
|
|
34
|
+
"open": "^10.0.0",
|
|
35
|
+
"ora": "^8.0.1"
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@types/node": "^20.11.0",
|
|
39
|
+
"typescript": "^5.3.3"
|
|
40
|
+
},
|
|
41
|
+
"engines": {
|
|
42
|
+
"node": ">=18"
|
|
43
|
+
},
|
|
44
|
+
"files": [
|
|
45
|
+
"dist",
|
|
46
|
+
"templates"
|
|
47
|
+
]
|
|
48
|
+
}
|