Skip to content

Commit c06e85b

Browse files
authored
fix(obsidian): clear community-store review for 0.1.2 + asset attestations (#2107)
Obsidian community-store automated review (v0.1.1) flagged three errors and a warning; this clears them and adds build-provenance attestations. Errors: - Manifest description must not include the word 'Obsidian' → reworded to '...cites the source notes. Your vault stays the single source of truth.' - no-static-styles-assignment (chat-view.ts): el.style.height = ... → el.setCssStyles({ height }) per the plugin guidelines. - no-unsupported-api (main.ts): Workspace.revealLeaf requires Obsidian v1.7.2 → bump minAppVersion 1.5.0 → 1.7.2 (matches the obsidian@^1.7.2 types we build against). versions.json 0.1.2 → 1.7.2. Warning: - builtin-modules dep → Node's built-in module.builtinModules in esbuild config; dependency removed. Recommendation (build-provenance attestations for main.js/styles.css): - Add actions/attest-build-provenance for the Obsidian assets in release-integration.yml (+ attestations: write). Assets release in the dedicated repo while the build runs here, so verify at owner scope: gh attestation verify main.js --owner vectorize-io. Bumps manifest to 0.1.2. Verified with the bot's own linter (eslint-plugin-obsidianmd): both code errors clear. build + tsc + 46 tests pass.
1 parent 1d1f718 commit c06e85b

7 files changed

Lines changed: 27 additions & 25 deletions

File tree

.github/workflows/release-integration.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ jobs:
99
publish:
1010
runs-on: ubuntu-latest
1111
permissions:
12-
id-token: write # for PyPI trusted publishing
12+
id-token: write # for PyPI trusted publishing + build-provenance attestations
13+
attestations: write # for actions/attest-build-provenance (Obsidian assets)
1314
# No `contents: write`: we never create releases in this repo. The Obsidian
1415
# plugin's distribution release is pushed to its dedicated repo using
1516
# OBSIDIAN_DIST_TOKEN (see the "Mirror Obsidian plugin" step below).
@@ -115,6 +116,18 @@ jobs:
115116
working-directory: ./hindsight-integrations/${{ steps.info.outputs.integration }}
116117
run: npm run build
117118

119+
# Build-provenance attestations for the Obsidian release assets (community-store
120+
# recommendation). Runs after the build so main.js exists. The assets are
121+
# released in the dedicated repo while the build runs here, so users verify at
122+
# owner scope: `gh attestation verify main.js --owner vectorize-io`.
123+
- name: Attest Obsidian plugin build provenance
124+
if: steps.type.outputs.type == 'typescript' && steps.info.outputs.integration == 'obsidian'
125+
uses: actions/attest-build-provenance@v2
126+
with:
127+
subject-path: |
128+
hindsight-integrations/obsidian/main.js
129+
hindsight-integrations/obsidian/styles.css
130+
118131
# ── Obsidian plugin — mirror to its dedicated repo + cut the BRAT release ──
119132
# We do NOT create a GitHub Release in this monorepo: per-integration
120133
# releases pollute the repo's release list (it's for the core product) and

hindsight-integrations/obsidian/esbuild.config.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import esbuild from "esbuild";
22
import process from "node:process";
3-
import builtins from "builtin-modules";
3+
// Node's own builtins list — replaces the external "builtin-modules" package.
4+
import { builtinModules as builtins } from "node:module";
45

56
const production = process.argv[2] === "production";
67

hindsight-integrations/obsidian/manifest.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"id": "hindsight",
33
"name": "Hindsight",
4-
"version": "0.1.1",
5-
"minAppVersion": "1.5.0",
6-
"description": "Ground your AI agents on your vault. Sync notes into Hindsight memory and chat with an agent that cites your notes — Obsidian stays the source of truth.",
4+
"version": "0.1.2",
5+
"minAppVersion": "1.7.2",
6+
"description": "Sync your notes into a Hindsight memory bank and chat with an AI agent that answers from your vault and cites the source notes. Your vault stays the single source of truth.",
77
"author": "Vectorize",
88
"authorUrl": "https://hindsight.vectorize.io",
99
"isDesktopOnly": true

hindsight-integrations/obsidian/package-lock.json

Lines changed: 2 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

hindsight-integrations/obsidian/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
],
3333
"devDependencies": {
3434
"@types/node": "^22.0.0",
35-
"builtin-modules": "^4.0.0",
3635
"esbuild": "^0.24.0",
3736
"obsidian": "^1.7.2",
3837
"typescript": "^5.7.0",

hindsight-integrations/obsidian/src/chat-view.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,10 @@ export class ChatView extends ItemView {
9393
/** Resize the composer to fit its content, up to INPUT_MAX_HEIGHT (then it scrolls). */
9494
private autoGrowInput(): void {
9595
const el = this.input;
96-
el.style.height = "auto";
97-
el.style.height = `${Math.min(el.scrollHeight, INPUT_MAX_HEIGHT)}px`;
96+
// Use Obsidian's setCssStyles (not el.style.x =) per the plugin guidelines.
97+
// Reset to auto first so scrollHeight reflects the content's natural height.
98+
el.setCssStyles({ height: "auto" });
99+
el.setCssStyles({ height: `${Math.min(el.scrollHeight, INPUT_MAX_HEIGHT)}px` });
98100
}
99101

100102
private buildHeader(root: HTMLElement): void {
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
22
"0.1.0": "1.5.0",
3-
"0.1.1": "1.5.0"
3+
"0.1.1": "1.5.0",
4+
"0.1.2": "1.7.2"
45
}

0 commit comments

Comments
 (0)