@lebtiga/sonic-agent 1.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/LICENSE.txt +223 -0
- package/README.md +61 -0
- package/bin/sonic.js +304 -0
- package/lib/index.js +20 -0
- package/lib/installer.js +156 -0
- package/lib/license.js +48 -0
- package/package.json +46 -0
- package/plugin/.claude-plugin/plugin.json +13 -0
- package/plugin/README.md +100 -0
- package/plugin/agents/sonic.md +80 -0
- package/plugin/commands/sonic-build.md +145 -0
- package/plugin/commands/sonic-help.md +71 -0
- package/plugin/skills/accessibility-qa/SKILL.md +160 -0
- package/plugin/skills/accessibility-qa/templates/accessibility-qa-report-template.md +123 -0
- package/plugin/skills/accessibility-qa/templates/wcag-compliance-statement.md +70 -0
- package/plugin/skills/aka-wireframe-wp/SKILL.md +149 -0
- package/plugin/skills/aka-wireframe-wp/assets/aka-framework-theme/README.md +190 -0
- package/plugin/skills/aka-wireframe-wp/assets/aka-framework-theme/footer.php +49 -0
- package/plugin/skills/aka-wireframe-wp/assets/aka-framework-theme/functions.php +395 -0
- package/plugin/skills/aka-wireframe-wp/assets/aka-framework-theme/header.php +58 -0
- package/plugin/skills/aka-wireframe-wp/assets/aka-framework-theme/index.php +39 -0
- package/plugin/skills/aka-wireframe-wp/assets/aka-framework-theme/page-answer.php +62 -0
- package/plugin/skills/aka-wireframe-wp/assets/aka-framework-theme/page-authority-hub.php +122 -0
- package/plugin/skills/aka-wireframe-wp/assets/aka-framework-theme/page-knowledge.php +58 -0
- package/plugin/skills/aka-wireframe-wp/assets/aka-framework-theme/style.css +633 -0
- package/plugin/skills/aka-wireframe-wp/references/content-generator.md +371 -0
- package/plugin/skills/aka-wireframe-wp/references/internal-linker.md +430 -0
- package/plugin/skills/aka-wireframe-wp/references/orchestrator.md +269 -0
- package/plugin/skills/aka-wireframe-wp/references/prompts-library.md +880 -0
- package/plugin/skills/aka-wireframe-wp/references/seo-optimizer.md +433 -0
- package/plugin/skills/aka-wireframe-wp/references/strategy-planner.md +317 -0
- package/plugin/skills/aka-wireframe-wp/references/wordpress-deployer.md +545 -0
- package/plugin/skills/authority-site-builder/SKILL.md +138 -0
- package/plugin/skills/brand-philosophy/SKILL.md +77 -0
- package/plugin/skills/freepik-spaces/SKILL.md +122 -0
- package/plugin/skills/freepik-spaces/docs/automation-guide.md +233 -0
- package/plugin/skills/freepik-spaces/docs/research-notes.md +264 -0
- package/plugin/skills/freepik-spaces/plans/naseberry-demo-plan.md +320 -0
- package/plugin/skills/freepik-spaces/templates/naseberry-demo.json +302 -0
- package/plugin/skills/freepik-spaces/templates/saas-demo.json +212 -0
- package/plugin/skills/frontend-design/LICENSE.txt +177 -0
- package/plugin/skills/frontend-design/SKILL.md +77 -0
- package/plugin/skills/programmatic-seo/SKILL.md +236 -0
- package/plugin/skills/programmatic-seo/references/playbooks.md +293 -0
- package/plugin/skills/seo-qa/SKILL.md +132 -0
- package/plugin/skills/seo-qa/templates/schema-localbusiness.json +49 -0
- package/plugin/skills/seo-qa/templates/schema-service.json +36 -0
- package/plugin/skills/seo-qa/templates/seo-qa-report-template.md +90 -0
- package/plugin/skills/visual-identity/SKILL.md +109 -0
- package/plugin/skills/visual-identity/templates/style-guide-template.md +108 -0
- package/plugin/skills/website-image-gen/SKILL.md +82 -0
- package/plugin/skills/website-image-gen/templates/blog-featured.md +56 -0
- package/plugin/skills/website-image-gen/templates/hero-service-photo.md +56 -0
- package/plugin/skills/wordpress-pro/SKILL.md +105 -0
- package/plugin/skills/wordpress-pro/references/gutenberg-blocks.md +870 -0
- package/plugin/skills/wordpress-pro/references/hooks-filters.md +845 -0
- package/plugin/skills/wordpress-pro/references/performance-security.md +1012 -0
- package/plugin/skills/wordpress-pro/references/plugin-architecture.md +1041 -0
- package/plugin/skills/wordpress-pro/references/theme-development.md +858 -0
- package/plugin/sops/SOP-Sonic 777/authority-site-sop.html +1100 -0
- package/plugin/sops/SOP-WORDPRESS-330-PAGE-SITES.md +926 -0
- package/scripts/postinstall.js +109 -0
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Postinstall — runs after `npm install -g @lebtiga/sonic-agent`.
|
|
3
|
+
// Local-only: prompts for license key + email, format-checks the key,
|
|
4
|
+
// installs to ~/.sonic, and watermarks SOPs with the buyer's email.
|
|
5
|
+
|
|
6
|
+
const { isValidFormat } = require('../lib/license');
|
|
7
|
+
const { installPlugin, isInstalled, getLicenseInfo } = require('../lib/installer');
|
|
8
|
+
|
|
9
|
+
// Skip in CI environments and when running inside the package source.
|
|
10
|
+
if (process.env.CI === 'true' || process.env.SONIC_SKIP_POSTINSTALL === '1') {
|
|
11
|
+
process.exit(0);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
let c;
|
|
15
|
+
try {
|
|
16
|
+
c = require('kleur');
|
|
17
|
+
} catch (e) {
|
|
18
|
+
c = { yellow: (s) => s, red: (s) => s, green: (s) => s, bold: (s) => s, dim: (s) => s, cyan: (s) => s };
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
let prompts;
|
|
22
|
+
try {
|
|
23
|
+
prompts = require('prompts');
|
|
24
|
+
} catch (e) {
|
|
25
|
+
prompts = null;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
async function main() {
|
|
29
|
+
console.log('');
|
|
30
|
+
console.log(c.cyan('⚡ Sonic Agent — Setup'));
|
|
31
|
+
console.log(c.dim('────────────────────────────────────────'));
|
|
32
|
+
console.log('');
|
|
33
|
+
|
|
34
|
+
if (isInstalled()) {
|
|
35
|
+
const existing = getLicenseInfo();
|
|
36
|
+
if (existing && existing.licenseKey) {
|
|
37
|
+
console.log(c.green('✓ Sonic is already installed.'));
|
|
38
|
+
console.log(c.dim(` Licensed to: ${existing.buyerEmail || 'unknown'}`));
|
|
39
|
+
console.log(c.dim(` Run "sonic" to start.`));
|
|
40
|
+
console.log('');
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
if (!prompts) {
|
|
46
|
+
console.log(c.yellow('⚠️ Interactive prompt unavailable.'));
|
|
47
|
+
console.log(c.yellow(' Run "sonic activate" after install to enter your license key.'));
|
|
48
|
+
console.log('');
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const response = await prompts([
|
|
53
|
+
{
|
|
54
|
+
type: 'text',
|
|
55
|
+
name: 'licenseKey',
|
|
56
|
+
message: 'Enter your Sonic license key:',
|
|
57
|
+
validate: (value) =>
|
|
58
|
+
isValidFormat(value) ? true : 'Invalid format. Expected: SONIC-XXXX-XXXX-XXXX-XXXX',
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
type: (prev) => (prev ? 'text' : null),
|
|
62
|
+
name: 'email',
|
|
63
|
+
message: 'Email address on your Sonic license:',
|
|
64
|
+
validate: (value) =>
|
|
65
|
+
value && value.includes('@') && value.includes('.')
|
|
66
|
+
? true
|
|
67
|
+
: 'Please enter a valid email address.',
|
|
68
|
+
},
|
|
69
|
+
]);
|
|
70
|
+
|
|
71
|
+
if (!response.licenseKey || !response.email) {
|
|
72
|
+
console.log(c.yellow('⚠️ Setup cancelled. Run "sonic activate" later to complete.'));
|
|
73
|
+
process.exit(0);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
const licenseKey = response.licenseKey.trim().toUpperCase();
|
|
77
|
+
const email = response.email.trim().toLowerCase();
|
|
78
|
+
|
|
79
|
+
console.log('');
|
|
80
|
+
console.log(c.dim(' Installing Sonic to ~/.sonic ...'));
|
|
81
|
+
|
|
82
|
+
try {
|
|
83
|
+
const result = installPlugin(licenseKey, email);
|
|
84
|
+
console.log(c.green(' ✓ Sonic installed'));
|
|
85
|
+
console.log(c.dim(` Core: ${result.sonicAgent}`));
|
|
86
|
+
console.log(c.dim(` Skills: ${result.sonicSkills}`));
|
|
87
|
+
console.log(c.dim(` User: ${result.sonicUser}`));
|
|
88
|
+
} catch (err) {
|
|
89
|
+
console.log(c.red(` ✗ Install failed: ${err.message}`));
|
|
90
|
+
process.exit(1);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
console.log('');
|
|
94
|
+
console.log(c.bold(c.green('⚡ Sonic is ready.')));
|
|
95
|
+
console.log('');
|
|
96
|
+
console.log(c.dim('Next steps:'));
|
|
97
|
+
console.log(' ' + c.cyan('sonic') + c.dim(' # start the Sonic agent'));
|
|
98
|
+
console.log(' ' + c.cyan('sonic init') + c.dim(' # set up a new project workspace'));
|
|
99
|
+
console.log(' ' + c.cyan('sonic --help') + c.dim(' # see all commands'));
|
|
100
|
+
console.log('');
|
|
101
|
+
console.log(c.dim('Workshop date + Slack invite were sent to your email.'));
|
|
102
|
+
console.log(c.dim('Welcome to the cohort. ⚡'));
|
|
103
|
+
console.log('');
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
main().catch((err) => {
|
|
107
|
+
console.error('Setup failed:', err.message);
|
|
108
|
+
process.exit(1);
|
|
109
|
+
});
|