@olegkoval/agent-skills 1.78.1 → 1.79.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.
@@ -0,0 +1,47 @@
1
+ #!/usr/bin/env node
2
+ import { readFileSync, realpathSync } from 'node:fs'
3
+ import { dirname, resolve } from 'node:path'
4
+ import { fileURLToPath } from 'node:url'
5
+ import { loadDedup } from './validate-lines.mjs'
6
+
7
+ const record = value => value && typeof value === 'object' && !Array.isArray(value)
8
+
9
+ export function deduplicateManifest(manifestPath) {
10
+ const path = resolve(manifestPath)
11
+ const manifest = JSON.parse(readFileSync(path, 'utf8'))
12
+ if (!record(manifest) || !Array.isArray(manifest.dimensions) || manifest.dimensions.length === 0) {
13
+ throw new Error('manifest must contain a non-empty dimensions array')
14
+ }
15
+ const dimensions = manifest.dimensions
16
+ if (!dimensions.every(item => record(item) && typeof item.name === 'string' && item.name.trim()
17
+ && item.name === item.name.trim() && typeof item.path === 'string' && item.path.trim()
18
+ && item.path === item.path.trim())) throw new Error('each dimension requires a non-empty name and path')
19
+ if (new Set(dimensions.map(item => item.name)).size !== dimensions.length) throw new Error('dimension names must be unique')
20
+ const findings = dimensions.flatMap(({ name, path: resultPath }) => {
21
+ const document = JSON.parse(readFileSync(resolve(dirname(path), resultPath), 'utf8'))
22
+ if (!record(document) || !Array.isArray(document.findings) || document.findings.some(finding => !record(finding))) {
23
+ throw new Error(`${name} result must contain a findings array of objects`)
24
+ }
25
+ return document.findings.map(finding => ({ ...finding, _dimension: name, agreedBy: [name] }))
26
+ })
27
+ return { findings: loadDedup()(findings) }
28
+ }
29
+
30
+ function main(args) {
31
+ const [flag, manifestPath, ...extra] = args
32
+ if (flag !== '--manifest' || !manifestPath || manifestPath.startsWith('--') || extra.length) {
33
+ console.error('usage: native-dedup.mjs --manifest <manifest.json>')
34
+ process.exitCode = 2
35
+ return
36
+ }
37
+ try { console.log(JSON.stringify(deduplicateManifest(manifestPath))) } catch (error) {
38
+ console.error(`native-dedup: ${error.message}`)
39
+ process.exitCode = 2
40
+ }
41
+ }
42
+
43
+ function isMain() {
44
+ try { return realpathSync(process.argv[1]) === realpathSync(fileURLToPath(import.meta.url)) } catch { return false }
45
+ }
46
+
47
+ if (isMain()) main(process.argv.slice(2))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@olegkoval/agent-skills",
3
- "version": "1.78.1",
3
+ "version": "1.79.0",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "olko-apple-kit",
3
3
  "description": "Build and ship Apple platform apps: macOS menubar apps, App Store submissions.",
4
- "version": "1.78.1",
4
+ "version": "1.79.0",
5
5
  "author": {
6
6
  "name": "Oleg Koval"
7
7
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "olko-creative",
3
3
  "description": "Creative and personal projects: photo galleries, music players, listings, wiki editing.",
4
- "version": "1.78.1",
4
+ "version": "1.79.0",
5
5
  "author": {
6
6
  "name": "Oleg Koval"
7
7
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "olko-garmin-kit",
3
3
  "description": "Build, test and publish Garmin Connect IQ watch faces.",
4
- "version": "1.78.1",
4
+ "version": "1.79.0",
5
5
  "author": {
6
6
  "name": "Oleg Koval"
7
7
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "olko-git-tools",
3
3
  "description": "Everyday git and GitHub CLI operations: conventional commits, branch hygiene.",
4
- "version": "1.78.1",
4
+ "version": "1.79.0",
5
5
  "author": {
6
6
  "name": "Oleg Koval"
7
7
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "olko-github-pr",
3
3
  "description": "Drive GitHub pull requests to merge-ready: review-bot loops, CI fixes, descriptions, dependency triage.",
4
- "version": "1.78.1",
4
+ "version": "1.79.0",
5
5
  "author": {
6
6
  "name": "Oleg Koval"
7
7
  },
@@ -0,0 +1,47 @@
1
+ #!/usr/bin/env node
2
+ import { readFileSync, realpathSync } from 'node:fs'
3
+ import { dirname, resolve } from 'node:path'
4
+ import { fileURLToPath } from 'node:url'
5
+ import { loadDedup } from './validate-lines.mjs'
6
+
7
+ const record = value => value && typeof value === 'object' && !Array.isArray(value)
8
+
9
+ export function deduplicateManifest(manifestPath) {
10
+ const path = resolve(manifestPath)
11
+ const manifest = JSON.parse(readFileSync(path, 'utf8'))
12
+ if (!record(manifest) || !Array.isArray(manifest.dimensions) || manifest.dimensions.length === 0) {
13
+ throw new Error('manifest must contain a non-empty dimensions array')
14
+ }
15
+ const dimensions = manifest.dimensions
16
+ if (!dimensions.every(item => record(item) && typeof item.name === 'string' && item.name.trim()
17
+ && item.name === item.name.trim() && typeof item.path === 'string' && item.path.trim()
18
+ && item.path === item.path.trim())) throw new Error('each dimension requires a non-empty name and path')
19
+ if (new Set(dimensions.map(item => item.name)).size !== dimensions.length) throw new Error('dimension names must be unique')
20
+ const findings = dimensions.flatMap(({ name, path: resultPath }) => {
21
+ const document = JSON.parse(readFileSync(resolve(dirname(path), resultPath), 'utf8'))
22
+ if (!record(document) || !Array.isArray(document.findings) || document.findings.some(finding => !record(finding))) {
23
+ throw new Error(`${name} result must contain a findings array of objects`)
24
+ }
25
+ return document.findings.map(finding => ({ ...finding, _dimension: name, agreedBy: [name] }))
26
+ })
27
+ return { findings: loadDedup()(findings) }
28
+ }
29
+
30
+ function main(args) {
31
+ const [flag, manifestPath, ...extra] = args
32
+ if (flag !== '--manifest' || !manifestPath || manifestPath.startsWith('--') || extra.length) {
33
+ console.error('usage: native-dedup.mjs --manifest <manifest.json>')
34
+ process.exitCode = 2
35
+ return
36
+ }
37
+ try { console.log(JSON.stringify(deduplicateManifest(manifestPath))) } catch (error) {
38
+ console.error(`native-dedup: ${error.message}`)
39
+ process.exitCode = 2
40
+ }
41
+ }
42
+
43
+ function isMain() {
44
+ try { return realpathSync(process.argv[1]) === realpathSync(fileURLToPath(import.meta.url)) } catch { return false }
45
+ }
46
+
47
+ if (isMain()) main(process.argv.slice(2))
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "olko-obsidian",
3
3
  "description": "Keep an Obsidian vault in sync with work: PR sync, task rollover, morning routine.",
4
- "version": "1.78.1",
4
+ "version": "1.79.0",
5
5
  "author": {
6
6
  "name": "Oleg Koval"
7
7
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "olko-product",
3
3
  "description": "Take a product idea to a shippable build: MVP passes, full-stack scaffolds, UX/UI quality loops, launch plans.",
4
- "version": "1.78.1",
4
+ "version": "1.79.0",
5
5
  "author": {
6
6
  "name": "Oleg Koval"
7
7
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "olko-reflection",
3
3
  "description": "Look back and improve: self-critique, retrospectives, performance review, rapid learning.",
4
- "version": "1.78.1",
4
+ "version": "1.79.0",
5
5
  "author": {
6
6
  "name": "Oleg Koval"
7
7
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "olko-release",
3
3
  "description": "Ship a release: semantic-release setup, changelogs, store listing copy, release-day routine.",
4
- "version": "1.78.1",
4
+ "version": "1.79.0",
5
5
  "author": {
6
6
  "name": "Oleg Koval"
7
7
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "olko-skill-meta",
3
3
  "description": "Author and maintain agent skills and the AI toolchain itself.",
4
- "version": "1.78.1",
4
+ "version": "1.79.0",
5
5
  "author": {
6
6
  "name": "Oleg Koval"
7
7
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "olko-web-ops",
3
3
  "description": "Operate a website: WAF rules, search console audits, analytics bootstrap, docs indexes.",
4
- "version": "1.78.1",
4
+ "version": "1.79.0",
5
5
  "author": {
6
6
  "name": "Oleg Koval"
7
7
  },