@archangel70/cosmo 1.16.0 → 1.16.2
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/CHANGELOG.md +12 -0
- package/README.md +4 -4
- package/package.json +2 -2
- package/packages/cli/bin/cosmo.mjs +1 -1
- package/packages/cli/lib/doctor.mjs +2 -2
- package/packages/cli/lib/intelligence-audit.mjs +89 -12
- package/plugins/agent-skills/cosmo/.cosmo-agent.json +1 -1
- package/plugins/antigravity/cosmo.md +1 -1
- package/plugins/claude-code/cosmo/.claude-plugin/plugin.json +1 -1
- package/templates/astro-site/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
All notable Cosmo changes are recorded here.
|
|
4
4
|
|
|
5
|
+
## 1.16.2 — Native Astro intelligence resilience
|
|
6
|
+
|
|
7
|
+
- Stopped intelligence checks from parsing Astro's JavaScript and TypeScript frontmatter as YAML on adopted native sites.
|
|
8
|
+
- Preserved native route metadata for editorial and regulated checks while inspecting only the rendered template surface for copy patterns.
|
|
9
|
+
- Converted unreadable native page sources into scoped findings and isolated unexpected pack failures so one problem cannot erase the rest of the intelligence report.
|
|
10
|
+
- Added regression coverage for JavaScript-heavy Astro pages and partial intelligence reports.
|
|
11
|
+
|
|
12
|
+
## 1.16.1 — Node compatibility guard
|
|
13
|
+
|
|
14
|
+
- Raised Cosmo's declared, documented, diagnosed, and CI-tested Node.js minimum to 22.23.4, matching the secured Astro toolchain shipped with v1.16.
|
|
15
|
+
|
|
5
16
|
## 1.16.0 — Recorded release waivers
|
|
6
17
|
|
|
7
18
|
- Added exact-finding release waivers with a required reason, named approver, timestamp, optional expiration, and durable revocation history.
|
|
@@ -9,6 +20,7 @@ All notable Cosmo changes are recorded here.
|
|
|
9
20
|
- Invalidated waivers when a finding changes or its source report becomes stale, while keeping missing, invalid, stale, and incomplete process gates non-waivable.
|
|
10
21
|
- Added waiver review and revocation commands, production-deployment enforcement, agent guidance, documentation, and regression coverage.
|
|
11
22
|
- Refreshed transitive build dependencies to resolve all currently reported npm vulnerabilities.
|
|
23
|
+
- Raised the documented and automated Node.js minimum to 22.23.4 to match the secured Astro toolchain.
|
|
12
24
|
|
|
13
25
|
## 1.15.1 — Complete user and command documentation
|
|
14
26
|
|
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ Cosmo helps an AI coding assistant build a complete, original Astro website for
|
|
|
4
4
|
|
|
5
5
|
You do **not** need to know how to code. Cosmo supports Claude Code, Codex, and Google Antigravity.
|
|
6
6
|
|
|
7
|
-
Current version: **1.16.
|
|
7
|
+
Current version: **1.16.2**
|
|
8
8
|
|
|
9
9
|
## Quick install
|
|
10
10
|
|
|
@@ -51,7 +51,7 @@ Cosmo uses Node.js to build and preview websites. You do not need to learn Node.
|
|
|
51
51
|
4. Accept the normal installation choices.
|
|
52
52
|
5. Finish the installation.
|
|
53
53
|
|
|
54
|
-
Cosmo requires Node.js 22.
|
|
54
|
+
Cosmo requires Node.js 22.23.4 or newer.
|
|
55
55
|
|
|
56
56
|
## Step 2: choose your AI coding assistant
|
|
57
57
|
|
|
@@ -82,7 +82,7 @@ This is the only part of the beginner setup that uses a terminal. It is one inst
|
|
|
82
82
|
cosmo --version
|
|
83
83
|
```
|
|
84
84
|
|
|
85
|
-
You should see `1.16.
|
|
85
|
+
You should see `1.16.2` or a newer version. Cosmo automatically installs its Claude, Codex, and Antigravity launchers.
|
|
86
86
|
|
|
87
87
|
### On Windows
|
|
88
88
|
|
|
@@ -99,7 +99,7 @@ You should see `1.16.0` or a newer version. Cosmo automatically installs its Cla
|
|
|
99
99
|
cosmo --version
|
|
100
100
|
```
|
|
101
101
|
|
|
102
|
-
You should see `1.16.
|
|
102
|
+
You should see `1.16.2` or a newer version. Cosmo automatically installs its Claude, Codex, and Antigravity launchers.
|
|
103
103
|
|
|
104
104
|
## Step 4: create your website folder
|
|
105
105
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@archangel70/cosmo",
|
|
3
|
-
"version": "1.16.
|
|
3
|
+
"version": "1.16.2",
|
|
4
4
|
"description": "Local-first, multi-agent Astro website builder for Claude, Codex, Antigravity, and the command line.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
"ssh2-sftp-client": "^12.1.1"
|
|
99
99
|
},
|
|
100
100
|
"engines": {
|
|
101
|
-
"node": ">=22.
|
|
101
|
+
"node": ">=22.23.4"
|
|
102
102
|
},
|
|
103
103
|
"publishConfig": {
|
|
104
104
|
"access": "public",
|
|
@@ -67,7 +67,7 @@ import {
|
|
|
67
67
|
workflowSummary,
|
|
68
68
|
} from '../lib/workflow.mjs';
|
|
69
69
|
|
|
70
|
-
const VERSION = '1.16.
|
|
70
|
+
const VERSION = '1.16.2';
|
|
71
71
|
const cliDirectory = path.dirname(fileURLToPath(import.meta.url));
|
|
72
72
|
const templateDirectory = path.resolve(cliDirectory, '../../../templates/astro-site');
|
|
73
73
|
const [command = 'start', ...rawArgs] = process.argv.slice(2);
|
|
@@ -22,8 +22,8 @@ export function diagnoseProject(projectDir) {
|
|
|
22
22
|
const checks = [];
|
|
23
23
|
try { readProject(projectDir); checks.push(check('project', 'pass', 'Cosmo project metadata is readable.')); }
|
|
24
24
|
catch (error) { checks.push(check('project', 'fail', error.message, 'Run this command inside a Cosmo project.')); }
|
|
25
|
-
const nodeOkay = versionAtLeast(process.versions.node, '22.
|
|
26
|
-
checks.push(check('node', nodeOkay ? 'pass' : 'fail', `Node ${process.versions.node}`, nodeOkay ? undefined : 'Install Node 22.
|
|
25
|
+
const nodeOkay = versionAtLeast(process.versions.node, '22.23.4');
|
|
26
|
+
checks.push(check('node', nodeOkay ? 'pass' : 'fail', `Node ${process.versions.node}`, nodeOkay ? undefined : 'Install Node 22.23.4 or newer.'));
|
|
27
27
|
const npm = spawnSync('npm', ['--version'], { encoding: 'utf8' });
|
|
28
28
|
checks.push(check('npm', npm.status === 0 ? 'pass' : 'fail', npm.status === 0 ? `npm ${npm.stdout.trim()}` : 'npm is unavailable.', 'Install npm and ensure it is on PATH.'));
|
|
29
29
|
const packageFile = path.join(projectDir, 'package.json');
|
|
@@ -58,10 +58,45 @@ function nativePlan(projectDir) {
|
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
function pageContent(projectDir, page) {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
61
|
+
if (typeof page.contentFile !== 'string' || !page.contentFile.trim()) {
|
|
62
|
+
return { file: null, data: null, surface: '', error: 'No content source is recorded for this page.' };
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
const projectRoot = path.resolve(projectDir);
|
|
66
|
+
const file = path.resolve(projectRoot, page.contentFile);
|
|
67
|
+
if (file !== projectRoot && !file.startsWith(`${projectRoot}${path.sep}`)) {
|
|
68
|
+
return { file, data: null, surface: '', error: 'The content source resolves outside the project.' };
|
|
69
|
+
}
|
|
70
|
+
if (!fs.existsSync(file)) {
|
|
71
|
+
return { file, data: null, surface: '', error: 'The content source does not exist.' };
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
try {
|
|
75
|
+
const source = fs.readFileSync(file, 'utf8');
|
|
76
|
+
if (path.extname(file).toLowerCase() === '.astro') {
|
|
77
|
+
const surface = source.replace(/^\uFEFF?---[ \t]*\r?\n[\s\S]*?\r?\n---[ \t]*(?:\r?\n|$)/, '');
|
|
78
|
+
return { file, data: page.data ?? {}, surface };
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
const parsed = matter(source);
|
|
82
|
+
return { file, data: parsed.data, surface: `${JSON.stringify(parsed.data)}\n${parsed.content}` };
|
|
83
|
+
} catch (error) {
|
|
84
|
+
return { file, data: null, surface: '', error: error instanceof Error ? error.message : String(error) };
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
function pageContentFinding(packId, page, content) {
|
|
89
|
+
return finding(
|
|
90
|
+
packId,
|
|
91
|
+
'page-content-unreadable',
|
|
92
|
+
'blocking',
|
|
93
|
+
`Page ${page.id} could not be inspected from ${page.contentFile ?? 'an unrecorded source'}: ${content.error}`,
|
|
94
|
+
'Repair the page source or update the native route inventory so Cosmo can inspect it.'
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
function readPageContent(context, page) {
|
|
99
|
+
return context.pageContent ? context.pageContent(page) : pageContent(context.projectDir, page);
|
|
65
100
|
}
|
|
66
101
|
|
|
67
102
|
function artifactState(projectDir, pack) {
|
|
@@ -134,11 +169,16 @@ function localFindings(context, artifact) {
|
|
|
134
169
|
}
|
|
135
170
|
|
|
136
171
|
function editorialFindings(context) {
|
|
137
|
-
const {
|
|
172
|
+
const { plan, pack } = context;
|
|
138
173
|
const findings = [];
|
|
139
174
|
const editorialTypes = new Set(['guide', 'answer', 'standard']);
|
|
140
175
|
for (const page of plan.pages.filter((item) => item.architecture?.indexability === 'index' && editorialTypes.has(item.type))) {
|
|
141
|
-
const
|
|
176
|
+
const inspected = readPageContent(context, page);
|
|
177
|
+
if (inspected.error) {
|
|
178
|
+
findings.push(pageContentFinding(pack.id, page, inspected));
|
|
179
|
+
continue;
|
|
180
|
+
}
|
|
181
|
+
const content = inspected.data;
|
|
142
182
|
for (const key of ['author', 'reviewedBy', 'publishedAt', 'correctionPolicy']) if (!nonEmpty(content?.editorial?.[key])) findings.push(finding(pack.id, 'editorial-metadata-missing', 'blocking', `Indexable editorial page ${page.id} is missing editorial.${key}.`, `Add approved ${key} metadata to the page.`));
|
|
143
183
|
for (const key of ['publishedAt', 'updatedAt']) if (content?.editorial?.[key] && Number.isNaN(Date.parse(content.editorial[key]))) findings.push(finding(pack.id, 'editorial-date-invalid', 'blocking', `Page ${page.id} has an invalid editorial.${key}.`, 'Use an ISO 8601 date.'));
|
|
144
184
|
}
|
|
@@ -146,8 +186,17 @@ function editorialFindings(context) {
|
|
|
146
186
|
}
|
|
147
187
|
|
|
148
188
|
function regulatedFindings(context, artifact) {
|
|
149
|
-
const {
|
|
189
|
+
const { plan, evidence, pack } = context;
|
|
150
190
|
const findings = [];
|
|
191
|
+
const unreadable = new Set();
|
|
192
|
+
const inspect = (page) => {
|
|
193
|
+
const content = readPageContent(context, page);
|
|
194
|
+
if (content.error && !unreadable.has(page.id)) {
|
|
195
|
+
findings.push(pageContentFinding(pack.id, page, content));
|
|
196
|
+
unreadable.add(page.id);
|
|
197
|
+
}
|
|
198
|
+
return content;
|
|
199
|
+
};
|
|
151
200
|
const claims = new Map(evidence.claims.map((claim) => [claim.id, claim]));
|
|
152
201
|
for (const page of plan.pages) {
|
|
153
202
|
const highRisk = (page.contract?.supportsClaims ?? []).map((id) => claims.get(id)).filter((claim) => claim?.risk === 'high');
|
|
@@ -157,7 +206,9 @@ function regulatedFindings(context, artifact) {
|
|
|
157
206
|
if (!verified) findings.push(finding(pack.id, 'regulated-claim-unverified', 'blocking', `Page ${page.id} uses high-risk claim ${claim.id} without verified proof.`, 'Obtain reviewer-approved proof or remove the claim.'));
|
|
158
207
|
}
|
|
159
208
|
if (page.architecture?.indexability === 'index') {
|
|
160
|
-
const
|
|
209
|
+
const content = inspect(page);
|
|
210
|
+
if (content.error) continue;
|
|
211
|
+
const review = content.data?.regulatoryReview;
|
|
161
212
|
for (const key of ['reviewedBy', 'reviewedAt', 'jurisdiction']) if (!nonEmpty(review?.[key])) findings.push(finding(pack.id, 'regulatory-review-missing', 'blocking', `Indexable regulated page ${page.id} is missing regulatoryReview.${key}.`, 'Record the authorized review before indexing.'));
|
|
162
213
|
if (review?.status !== 'approved') findings.push(finding(pack.id, 'regulatory-review-not-approved', 'blocking', `Indexable regulated page ${page.id} does not have approved regulatory review.`, 'Set status to approved only after the named reviewer signs off.'));
|
|
163
214
|
const suppliedDisclaimers = new Set(review?.disclaimers ?? []);
|
|
@@ -166,7 +217,9 @@ function regulatedFindings(context, artifact) {
|
|
|
166
217
|
}
|
|
167
218
|
const prohibited = Array.isArray(artifact?.prohibitedClaims) ? artifact.prohibitedClaims.filter((item) => typeof item === 'string' && item.trim()) : [];
|
|
168
219
|
for (const page of plan.pages) {
|
|
169
|
-
const
|
|
220
|
+
const content = inspect(page);
|
|
221
|
+
if (content.error) continue;
|
|
222
|
+
const surface = normalized(content.surface);
|
|
170
223
|
for (const phrase of prohibited) if (surface.includes(normalized(phrase))) findings.push(finding(pack.id, 'prohibited-regulated-claim', 'blocking', `Page ${page.id} contains prohibited claim language: “${phrase}”.`, 'Remove the language and request regulated-content review.'));
|
|
171
224
|
}
|
|
172
225
|
return findings;
|
|
@@ -332,7 +385,12 @@ function editorialNaturalnessFindings(context, artifact) {
|
|
|
332
385
|
}
|
|
333
386
|
const allowed = new Set((artifact?.allowedPatterns ?? []).map(String));
|
|
334
387
|
for (const page of plan.pages) {
|
|
335
|
-
const
|
|
388
|
+
const content = readPageContent(context, page);
|
|
389
|
+
if (content.error) {
|
|
390
|
+
findings.push(pageContentFinding(pack.id, page, content));
|
|
391
|
+
continue;
|
|
392
|
+
}
|
|
393
|
+
const surface = content.surface;
|
|
336
394
|
const hits = [];
|
|
337
395
|
for (const item of NATURALNESS_PATTERNS) {
|
|
338
396
|
const matches = [...surface.matchAll(new RegExp(item.pattern.source, item.pattern.flags))];
|
|
@@ -457,10 +515,29 @@ export function evaluateIntelligence(projectDir) {
|
|
|
457
515
|
? nativePlan(projectDir)
|
|
458
516
|
: readJson(path.join(projectDir, '.cosmo', 'build-plan.json')) ?? { pages: [] };
|
|
459
517
|
const evidence = readJson(path.join(projectDir, '.cosmo', 'evidence.json')) ?? { claims: [], proofs: [] };
|
|
518
|
+
const pageContentCache = new Map();
|
|
519
|
+
const cachedPageContent = (page) => {
|
|
520
|
+
const key = `${page.id ?? ''}\0${page.contentFile ?? ''}`;
|
|
521
|
+
if (!pageContentCache.has(key)) pageContentCache.set(key, pageContent(projectDir, page));
|
|
522
|
+
return pageContentCache.get(key);
|
|
523
|
+
};
|
|
460
524
|
const packs = intelligence.manifests.map((pack) => {
|
|
461
525
|
const artifact = artifactState(projectDir, pack);
|
|
462
|
-
const context = { projectDir, project, plan, evidence, pack };
|
|
463
|
-
|
|
526
|
+
const context = { projectDir, project, plan, evidence, pack, pageContent: cachedPageContent };
|
|
527
|
+
let specialized = [];
|
|
528
|
+
if (artifact.data) {
|
|
529
|
+
try {
|
|
530
|
+
specialized = EVALUATORS[pack.id]?.(context, artifact.data) ?? [];
|
|
531
|
+
} catch (error) {
|
|
532
|
+
specialized = [finding(
|
|
533
|
+
pack.id,
|
|
534
|
+
'pack-evaluation-failed',
|
|
535
|
+
'blocking',
|
|
536
|
+
`${pack.title} could not finish its evaluation: ${error instanceof Error ? error.message : String(error)}`,
|
|
537
|
+
'Repair the reported project input or pack configuration, then run the intelligence check again.'
|
|
538
|
+
)];
|
|
539
|
+
}
|
|
540
|
+
}
|
|
464
541
|
const findings = [...artifact.findings, ...declarativeFindings(pack, artifact.data), ...specialized];
|
|
465
542
|
const blocking = findings.filter((item) => item.severity === 'blocking').length;
|
|
466
543
|
const warnings = findings.filter((item) => item.severity === 'warning').length;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cosmo/astro-starter",
|
|
3
|
-
"version": "1.16.
|
|
3
|
+
"version": "1.16.2",
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -18,6 +18,6 @@
|
|
|
18
18
|
"typescript": "^5.9.2"
|
|
19
19
|
},
|
|
20
20
|
"engines": {
|
|
21
|
-
"node": ">=22.
|
|
21
|
+
"node": ">=22.23.4"
|
|
22
22
|
}
|
|
23
23
|
}
|