@archangel70/cosmo 1.16.3 → 1.16.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.
- package/CHANGELOG.md +8 -0
- package/README.md +5 -3
- package/package.json +1 -1
- package/packages/cli/bin/cosmo.mjs +1 -1
- package/packages/cli/lib/entity-map.mjs +10 -4
- 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/scripts/audit-dependencies.mjs +1 -7
- package/templates/astro-site/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
All notable Cosmo changes are recorded here.
|
|
4
4
|
|
|
5
|
+
## 1.16.4 — Reliable native EntityMap metadata
|
|
6
|
+
|
|
7
|
+
- Preserved apostrophes and quote characters inside native Astro HTML metadata instead of truncating descriptions at the first apostrophe.
|
|
8
|
+
- Accepted both Wikidata `/entity/Q…` API identifiers and public `/wiki/Q…` identifiers for reviewed `sameAs` matches.
|
|
9
|
+
- Canonicalized Wikidata enrichment candidates and published matches to `https://www.wikidata.org/wiki/Q…`.
|
|
10
|
+
- Added regression coverage for adopted native descriptions and previously saved Wikidata entity URLs.
|
|
11
|
+
- Removed the now-unnecessary `picomatch` audit exception after the dependency graph updated to a clean release.
|
|
12
|
+
|
|
5
13
|
## 1.16.3 — Unified dependency security gate
|
|
6
14
|
|
|
7
15
|
- Upgraded `basic-ftp` to 6.2.6, resolving the published directory-listing and credential newline denial-of-service advisories in Cosmo's FTP deployment path.
|
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.4**
|
|
8
8
|
|
|
9
9
|
## Quick install
|
|
10
10
|
|
|
@@ -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.4` 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.3` 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.4` 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
|
|
|
@@ -452,6 +452,8 @@ Cosmo publishes `/entitymap.json` and `/entitymap.html`, adds the discovery link
|
|
|
452
452
|
|
|
453
453
|
On an adopted Astro site, EntityMap uses the approved native route inventory and the site's built HTML. It does not require `src/content/pages`, replace hand-authored `.astro` pages, or change the existing design. Home and about represent the Organization, service and service-area routes become Services and Places, and other routes become Concepts unless a reviewed route override supplies a different name or core type.
|
|
454
454
|
|
|
455
|
+
Cosmo preserves complete HTML metadata, including apostrophes inside descriptions. Accepted Wikidata `/entity/Q…` and `/wiki/Q…` identifiers are normalized to the public `https://www.wikidata.org/wiki/Q…` form before they appear in the EntityMap.
|
|
456
|
+
|
|
455
457
|
Advanced users can run:
|
|
456
458
|
|
|
457
459
|
```bash
|
package/package.json
CHANGED
|
@@ -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.4';
|
|
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);
|
|
@@ -142,7 +142,8 @@ function plainText(value) {
|
|
|
142
142
|
}
|
|
143
143
|
|
|
144
144
|
function attribute(tag, name) {
|
|
145
|
-
|
|
145
|
+
const match = tag.match(new RegExp(`\\b${name}\\s*=\\s*(?:"([^"]*)"|'([^']*)')`, 'i'));
|
|
146
|
+
return (match?.[1] ?? match?.[2])?.trim() ?? '';
|
|
146
147
|
}
|
|
147
148
|
|
|
148
149
|
function metaContent(html, name) {
|
|
@@ -264,8 +265,13 @@ function entityIdentity(page, publisher) {
|
|
|
264
265
|
}
|
|
265
266
|
|
|
266
267
|
function publicSameAs(config, entityId) {
|
|
267
|
-
const
|
|
268
|
-
|
|
268
|
+
const canonical = (uri) => {
|
|
269
|
+
const wikidata = String(uri ?? '').match(/^https?:\/\/(?:www\.)?wikidata\.org\/(?:wiki|entity)\/(Q\d+)$/i);
|
|
270
|
+
if (wikidata) return `https://www.wikidata.org/wiki/${wikidata[1].toUpperCase()}`;
|
|
271
|
+
return /^https:\/\/[^/]*wikipedia\.org\/wiki\//i.test(uri ?? '') ? uri : null;
|
|
272
|
+
};
|
|
273
|
+
const match = config.approvedMatches.find((item) => item.entityId === entityId && item.status === 'accepted' && canonical(item.uri));
|
|
274
|
+
return match ? canonical(match.uri) : null;
|
|
269
275
|
}
|
|
270
276
|
|
|
271
277
|
function stableGenerated(previous, next) {
|
|
@@ -470,7 +476,7 @@ async function enrichWikidata(subjects, fetchImpl, {
|
|
|
470
476
|
}
|
|
471
477
|
if (!response.ok) throw new Error(`Wikidata returned HTTP ${response.status}.`);
|
|
472
478
|
const body = await response.json();
|
|
473
|
-
for (const item of body.search ?? []) values.push({ provider: 'wikidata', entityId: subject.entityId, matchedName: item.label, externalId: item.id, uri:
|
|
479
|
+
for (const item of body.search ?? []) values.push({ provider: 'wikidata', entityId: subject.entityId, matchedName: item.label, externalId: item.id, uri: `https://www.wikidata.org/wiki/${item.id}`, description: item.description ?? '', score: null });
|
|
474
480
|
}
|
|
475
481
|
return values;
|
|
476
482
|
}
|
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
import { spawnSync } from 'node:child_process';
|
|
2
2
|
import { pathToFileURL } from 'node:url';
|
|
3
3
|
|
|
4
|
-
export const AUDIT_EXCEPTIONS = [
|
|
5
|
-
source: '1247710',
|
|
6
|
-
advisory: 'GHSA-fc5q-39xc-vjpf',
|
|
7
|
-
package: 'picomatch',
|
|
8
|
-
expiresAt: '2026-12-17T23:59:59Z',
|
|
9
|
-
rationale: 'No patched picomatch release exists. Cosmo and its Astro toolchain do not accept untrusted public glob expressions.',
|
|
10
|
-
}];
|
|
4
|
+
export const AUDIT_EXCEPTIONS = [];
|
|
11
5
|
|
|
12
6
|
const severityRank = { info: 0, low: 1, moderate: 2, high: 3, critical: 4 };
|
|
13
7
|
|