diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 09b411423..e15448f50 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -51,6 +51,15 @@ jobs: env: ARCHIFY_CHROME: ${{ steps.setup-chrome.outputs.chrome-path }} ARCHIFY_CHROME_NO_SANDBOX: '1' + - name: Install offline font test parser + run: npm ci --ignore-scripts --no-audit --no-fund + working-directory: archify + - name: Verify offline fonts and independent SVG/raster exports + run: node --test test/offline-font-browser.test.mjs + working-directory: archify + env: + ARCHIFY_CHROME: ${{ steps.setup-chrome.outputs.chrome-path }} + ARCHIFY_CHROME_NO_SANDBOX: '1' - name: Verify all five diagram modes localize Viewer interactions run: node --test test/i18n.test.mjs working-directory: archify diff --git a/CHANGELOG.md b/CHANGELOG.md index 9444e5d8c..bd03a3910 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ All notable changes are documented here. Format loosely follows [Keep a Changelo - **Machine-readable CLI argument failures (#330).** `validate --json` and `deliver --json` now keep invalid or missing option values, unknown options and diagram types, unsupported option combinations, and usage errors inside one versioned failure receipt on stdout. These failures use the `arguments` stage, stable diagnostic codes, and exit status 2, while human-mode stderr behavior remains unchanged. - **Complete artifact-check receipts (#311).** The checker now lets stdout drain before exiting, so large JSON receipts remain complete through pipes. Validation, delivery, and architecture comparison retain their original success/failure status without truncated-JSON errors. - **CLI output file types (#124).** Render, deliver, preview, and compare reject non-HTML artifact targets and compare rejects non-JSON receipt targets, including through symbolic links. Explicit absolute and parent-directory outputs remain supported; internal validation and inspection continue to work. +- **Self-contained viewer typography.** Delivered HTML and SVG embed the same fixed JetBrains Mono variable-font subsets and attribution; raster exports render from those definitions instead of selecting an installed copy. Covered characters retain the bundled font offline; CJK fallback and platform rasterization can still differ. The font adds about 96 KB per standalone HTML/SVG artifact, with the full SIL Open Font License retained in the font CSS and packaged Skill. - **License provenance in distributions.** Source and packaged Skill distributions retain Cocoon AI's exact MIT copyright notice, package staging and smoke tests fail closed when the notice or LICENSE is missing or altered, and the deterministic ZIP carries the same LICENSE bytes as the repository. - **Third-party mark notices in distributions.** Source and packaged Skill distributions now identify the pinned Simple Icons collection, disclose all individual icon licenses recorded by that version, preserve source and brand-guideline links, and state that Archify's MIT license does not replace third-party copyright or trademark terms. Package staging and smoke tests fail closed when the notice is missing or altered. - **Unsupported experiment source chains.** The Hivenue and Taiga Mermaid inputs and their generated derivatives are removed from the current tree because no verifiable redistribution license was available; the retained validation evidence now reports the remaining 3-source / 9-artifact set without rewriting historical results. diff --git a/THIRD_PARTY_NOTICES.md b/THIRD_PARTY_NOTICES.md index ebf91db6e..3c15e20a0 100644 --- a/THIRD_PARTY_NOTICES.md +++ b/THIRD_PARTY_NOTICES.md @@ -48,6 +48,19 @@ The OpenAI vector path is recorded from the Use remains subject to those current guidelines and any applicable trademark rights. Its inclusion does not state or imply endorsement by OpenAI. +## JetBrains Mono + +Delivered Archify viewer artifacts embed the JetBrains Mono variable font +subsets served by Google Fonts. For characters covered by these subsets, font +selection does not depend on a network request or a locally installed copy. +Uncovered characters (including CJK) still use the system fallback stack; +browser and operating-system rasterization can differ. +JetBrains Mono is maintained at +[github.com/JetBrains/JetBrainsMono](https://github.com/JetBrains/JetBrainsMono) +and is distributed under the SIL Open Font License 1.1. The complete license +text is preserved in `assets/JetBrainsMono-OFL.txt` in the packaged Skill and +in the font CSS carried by standalone HTML and SVG exports. + ## No additional rights granted Brand names, logos, and trademarks remain the property of their respective diff --git a/archify.zip b/archify.zip index 3b3bc3afe..1b21ad02c 100644 Binary files a/archify.zip and b/archify.zip differ diff --git a/archify/THIRD_PARTY_NOTICES.md b/archify/THIRD_PARTY_NOTICES.md index ebf91db6e..3c15e20a0 100644 --- a/archify/THIRD_PARTY_NOTICES.md +++ b/archify/THIRD_PARTY_NOTICES.md @@ -48,6 +48,19 @@ The OpenAI vector path is recorded from the Use remains subject to those current guidelines and any applicable trademark rights. Its inclusion does not state or imply endorsement by OpenAI. +## JetBrains Mono + +Delivered Archify viewer artifacts embed the JetBrains Mono variable font +subsets served by Google Fonts. For characters covered by these subsets, font +selection does not depend on a network request or a locally installed copy. +Uncovered characters (including CJK) still use the system fallback stack; +browser and operating-system rasterization can differ. +JetBrains Mono is maintained at +[github.com/JetBrains/JetBrainsMono](https://github.com/JetBrains/JetBrainsMono) +and is distributed under the SIL Open Font License 1.1. The complete license +text is preserved in `assets/JetBrainsMono-OFL.txt` in the packaged Skill and +in the font CSS carried by standalone HTML and SVG exports. + ## No additional rights granted Brand names, logos, and trademarks remain the property of their respective diff --git a/archify/assets/JetBrainsMono-OFL.txt b/archify/assets/JetBrainsMono-OFL.txt new file mode 100644 index 000000000..675d198b7 --- /dev/null +++ b/archify/assets/JetBrainsMono-OFL.txt @@ -0,0 +1,93 @@ +Copyright 2020 The JetBrains Mono Project Authors (https://github.com/JetBrains/JetBrainsMono) + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +https://openfontlicense.org + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/archify/assets/template.html b/archify/assets/template.html index a0cfe5fdc..587415f28 100644 --- a/archify/assets/template.html +++ b/archify/assets/template.html @@ -31,14 +31,140 @@ } catch (_) {} })(); - - - - + ', '']) { + assert.throws(() => assertOfflineArtifact(frame(template) + frame(template + resource), 'compare'), /external subresource/); + } + assertOfflineArtifact(template + 'Source', 'attribution'); +}); + +test('a freshly delivered artifact of every type reaches no external origin', () => { + const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'archify-offline-')); + try { + for (const [type, input] of DIAGRAMS) { + const output = path.join(dir, `${type}.html`); + const result = spawnSync(process.execPath, [cli, 'deliver', type, path.join(skillRoot, 'examples', input), output, '--quality', 'showcase', '--json'], { encoding: 'utf8' }); + assert.equal(result.status, 0, `${type}: ${result.stderr}`); + assertOfflineArtifact(fs.readFileSync(output, 'utf8'), type); + } + const output = path.join(dir, 'compare.html'); + const result = spawnSync(process.execPath, [cli, 'compare', 'architecture', path.join(skillRoot, 'examples/checkout-platform.base.architecture.json'), path.join(skillRoot, 'examples/checkout-platform.head.architecture.json'), output, '--json'], { encoding: 'utf8' }); + assert.equal(result.status, 0, result.stderr); + assert.equal(assertOfflineArtifact(fs.readFileSync(output, 'utf8'), 'fresh compare'), 2); + } finally { + fs.rmSync(dir, { recursive: true, force: true }); + } +}); + +test('every checked-in viewer artifact carries its font and reaches no external origin', () => { + // Delivery-chain roots only; frozen experiments are not maintained viewers. + const tracked = spawnSync('git', ['ls-files', '-z', '--', 'archify/examples', 'docs', 'examples'], { cwd: repoRoot, encoding: 'utf8' }); + assert.equal(tracked.status, 0, tracked.stderr); + const artifacts = tracked.stdout.split('\0').filter((entry) => entry.endsWith('.html')) + .filter((entry) => /Archify\.readerLayout/.test(fs.readFileSync(path.join(repoRoot, entry), 'utf8'))); + for (const required of ['examples/checkout-platform-delta.html', ...DIAGRAMS.map(([, , output]) => `archify/examples/${output}`)]) { + assert.ok(artifacts.includes(required), `missing delivery-chain artifact: ${required}`); + } + for (const relative of artifacts) assertOfflineArtifact(fs.readFileSync(path.join(repoRoot, relative), 'utf8'), relative); +}); diff --git a/docs/assets/archify-live-proof.gif b/docs/assets/archify-live-proof.gif index aef9eb430..3f0f7d649 100644 Binary files a/docs/assets/archify-live-proof.gif and b/docs/assets/archify-live-proof.gif differ diff --git a/docs/assets/archify-live-proof.json b/docs/assets/archify-live-proof.json index 41bd7d293..9b47db9b0 100644 --- a/docs/assets/archify-live-proof.json +++ b/docs/assets/archify-live-proof.json @@ -7,13 +7,13 @@ "fps": 10, "frameCount": 54, "durationSeconds": 5.4, - "bytes": 1598117, - "sha256": "d92ae0e307b423e4e1be234f8ca05fa3c8c30f05e7ee5eb5ba3d5e611980d209", + "bytes": 1629621, + "sha256": "ede2e0c6f3d5ef9f1d3aa9324a3ba55d23a8628c340d8ef50c6b7e3ce09610d5", "scenes": [ { "id": "signal-flow", "artifact": "docs/gallery/artifacts/agent-tool-call.workflow.html", - "artifactSha256": "2f3e110012a37961e53e1167b813b98b1992487fe30e1a7da797f329b6213515", + "artifactSha256": "fc7643fa7f3b0c85250f781f9927a905f518a5b4a8c28ec08afd6f3889f435e4", "view": "happy-path", "eyebrow": "WORKFLOW · SIGNAL FLOW", "title": "Agent Tool Call", @@ -22,7 +22,7 @@ { "id": "blueprint", "artifact": "docs/gallery/artifacts/production-deployment.architecture.html", - "artifactSha256": "277720cf06e7f6c5e7fc1e8699e98a588e9c1328d374451b2855cc9d2c864204", + "artifactSha256": "dccd530553b06c10397cf00a23c8f2a04e2bb25548c6d0c29ae912ed0d5a05fe", "view": "request-boundary", "eyebrow": "ARCHITECTURE · BLUEPRINT", "title": "Production Deployment", @@ -31,7 +31,7 @@ { "id": "classic", "artifact": "docs/gallery/artifacts/cache-miss.sequence.html", - "artifactSha256": "cdeced4cde195525b0d63d846f26e55c34a098c2e285b1339767fa6d4b3dd7f1", + "artifactSha256": "7c5c8f5c39c10dc8148591f654cd79a05ff49bb70166a4c45607414ca02cbe3a", "view": "cache-fallback", "eyebrow": "SEQUENCE · CLASSIC", "title": "Cache Miss Request", diff --git a/docs/assets/mco-runtime-reach-share-card.png b/docs/assets/mco-runtime-reach-share-card.png index fb01c20d0..590b267e0 100644 Binary files a/docs/assets/mco-runtime-reach-share-card.png and b/docs/assets/mco-runtime-reach-share-card.png differ diff --git a/docs/assets/mco-runtime-share-card.png b/docs/assets/mco-runtime-share-card.png index 7e0849e54..7acc4fb15 100644 Binary files a/docs/assets/mco-runtime-share-card.png and b/docs/assets/mco-runtime-share-card.png differ diff --git a/docs/cases/mco-runtime.architecture.html b/docs/cases/mco-runtime.architecture.html index bbcc702ab..34258ac92 100644 --- a/docs/cases/mco-runtime.architecture.html +++ b/docs/cases/mco-runtime.architecture.html @@ -31,14 +31,140 @@ } catch (_) {} })(); - - - - +