@gobing-ai/knowledge-kit 0.0.12 → 0.0.14
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/.claude-plugin/marketplace.json +1 -1
- package/dist/index.js +120 -26
- package/package.json +1 -1
- package/plugins/generations/content-gen/dist/index.js +22187 -0
- package/plugins/generations/content-gen/plugin.json +1 -1
- package/plugins/generations/core-facts-gen/dist/index.js +22068 -0
- package/plugins/generations/core-facts-gen/plugin.json +1 -1
- package/plugins/generations/daily-article-gen/dist/index.js +22050 -0
- package/plugins/generations/daily-article-gen/plugin.json +1 -1
- package/plugins/generations/daily-article-gen/src/index.ts +13 -1
- package/plugins/generations/dailynews-gen/dist/index.js +22344 -0
- package/plugins/generations/dailynews-gen/plugin.json +1 -1
- package/plugins/generations/episode-plan-gen/dist/index.js +22503 -0
- package/plugins/generations/episode-plan-gen/plugin.json +1 -1
- package/plugins/generations/episode-plan-gen/src/index.ts +11 -0
- package/plugins/generations/image-gen/config.example.yaml +75 -0
- package/plugins/generations/image-gen/dist/index.js +24862 -0
- package/plugins/generations/image-gen/package.json +17 -0
- package/plugins/generations/image-gen/plugin.json +7 -0
- package/plugins/generations/image-gen/presets/formats/cover.yaml +57 -0
- package/plugins/generations/image-gen/presets/formats/free.yaml +46 -0
- package/plugins/generations/image-gen/presets/formats/illustration.yaml +48 -0
- package/plugins/generations/image-gen/presets/styles/clean-webapp-ui.yaml +28 -0
- package/plugins/generations/image-gen/presets/styles/cute.yaml +3 -0
- package/plugins/generations/image-gen/presets/styles/editorial.yaml +3 -0
- package/plugins/generations/image-gen/presets/styles/fresh.yaml +3 -0
- package/plugins/generations/image-gen/presets/styles/minimalist.yaml +3 -0
- package/plugins/generations/image-gen/presets/styles/photorealistic.yaml +3 -0
- package/plugins/generations/image-gen/presets/styles/sketch.yaml +3 -0
- package/plugins/generations/image-gen/presets/styles/technical-diagram.yaml +3 -0
- package/plugins/generations/image-gen/presets/styles/vibrant.yaml +3 -0
- package/plugins/generations/image-gen/presets/styles/warm.yaml +3 -0
- package/plugins/generations/image-gen/src/bytes.ts +19 -0
- package/plugins/generations/image-gen/src/index.ts +319 -0
- package/plugins/generations/image-gen/src/job.ts +143 -0
- package/plugins/generations/image-gen/src/paths.ts +31 -0
- package/plugins/generations/image-gen/src/presets.ts +344 -0
- package/plugins/generations/image-gen/src/providers/agnes.ts +110 -0
- package/plugins/generations/image-gen/src/providers/azure.ts +153 -0
- package/plugins/generations/image-gen/src/providers/codex-cli.ts +170 -0
- package/plugins/generations/image-gen/src/providers/dashscope.ts +485 -0
- package/plugins/generations/image-gen/src/providers/google.ts +268 -0
- package/plugins/generations/image-gen/src/providers/huggingface.ts +59 -0
- package/plugins/generations/image-gen/src/providers/jimeng.ts +259 -0
- package/plugins/generations/image-gen/src/providers/minimax.ts +171 -0
- package/plugins/generations/image-gen/src/providers/openai.ts +319 -0
- package/plugins/generations/image-gen/src/providers/openrouter.ts +257 -0
- package/plugins/generations/image-gen/src/providers/refs.ts +24 -0
- package/plugins/generations/image-gen/src/providers/replicate.ts +279 -0
- package/plugins/generations/image-gen/src/providers/seedream.ts +128 -0
- package/plugins/generations/image-gen/src/providers/types.ts +286 -0
- package/plugins/generations/image-gen/src/providers/zai.ts +237 -0
- package/plugins/generations/image-gen/tsconfig.json +8 -0
- package/plugins/generations/news-report-gen/dist/index.js +22193 -0
- package/plugins/generations/news-report-gen/package.json +17 -0
- package/plugins/generations/news-report-gen/plugin.json +7 -0
- package/plugins/generations/news-report-gen/src/index.ts +308 -0
- package/plugins/generations/news-report-gen/tsconfig.json +4 -0
- package/plugins/generations/omni-voice-gen/Makefile +14 -0
- package/plugins/generations/omni-voice-gen/README.md +112 -0
- package/plugins/generations/omni-voice-gen/bin/omni-voice-gen +2 -0
- package/plugins/generations/omni-voice-gen/dist/omni-voice-gen-prr8skpb. +2 -0
- package/plugins/generations/omni-voice-gen/dist/omni-voice-gen.js +6 -0
- package/plugins/generations/omni-voice-gen/plugin.json +6 -0
- package/plugins/generations/omni-voice-gen/profiles.json +12 -0
- package/plugins/generations/omni-voice-gen/pyproject.toml +25 -0
- package/plugins/generations/omni-voice-gen/scripts/coverage_gate.py +74 -0
- package/plugins/generations/omni-voice-gen/src/omni_voice_gen/__init__.py +1 -0
- package/plugins/generations/omni-voice-gen/src/omni_voice_gen/__main__.py +39 -0
- package/plugins/generations/omni-voice-gen/src/omni_voice_gen/audio.py +190 -0
- package/plugins/generations/omni-voice-gen/src/omni_voice_gen/backend.py +150 -0
- package/plugins/generations/omni-voice-gen/src/omni_voice_gen/contract.py +76 -0
- package/plugins/generations/omni-voice-gen/src/omni_voice_gen/mp3.py +60 -0
- package/plugins/generations/omni-voice-gen/src/omni_voice_gen/pipeline.py +289 -0
- package/plugins/generations/omni-voice-gen/src/omni_voice_gen/profiles.py +100 -0
- package/plugins/generations/omni-voice-gen/src/omni_voice_gen/qc.py +234 -0
- package/plugins/generations/omni-voice-gen/src/omni_voice_gen/voicescript.py +352 -0
- package/plugins/generations/omni-voice-gen/uv.lock +3510 -0
- package/plugins/generations/voice-gen/dist/index.js +23055 -0
- package/plugins/generations/voice-gen/plugin.json +1 -1
- package/plugins/generations/voice-gen/src/index.ts +16 -1
- package/plugins/generations/voice-gen/src/voicebox-client.ts +3 -1
- package/plugins/ingestions/aihot-ingest/dist/index.js +22378 -0
- package/plugins/ingestions/aihot-ingest/plugin.json +1 -1
- package/plugins/ingestions/horizon-ingest/dist/index.js +22125 -0
- package/plugins/ingestions/horizon-ingest/plugin.json +1 -1
- package/plugins/ingestions/karakeep-local/dist/index.js +24204 -0
- package/plugins/ingestions/karakeep-local/plugin.json +1 -1
- package/plugins/ingestions/last30days-ingest/dist/index.js +22070 -0
- package/plugins/ingestions/last30days-ingest/plugin.json +1 -1
- package/plugins/ingestions/web-search/dist/index.js +24399 -0
- package/plugins/ingestions/web-search/plugin.json +1 -1
- package/plugins/kk/commands/image-extract.md +40 -0
- package/plugins/kk/commands/image-generate.md +32 -0
- package/plugins/kk/config.example.yaml +80 -0
- package/plugins/kk/plugin.json +1 -1
- package/plugins/kk/skills/image-authoring/SKILL.md +257 -0
- package/plugins/kk/skills/image-authoring/references/format-drafting.md +57 -0
- package/plugins/kk/skills/image-authoring/references/illustration-positions.md +87 -0
- package/plugins/kk/skills/image-authoring/references/migrating-from-wt.md +31 -0
- package/plugins/kk/skills/image-authoring/references/providers.md +52 -0
- package/plugins/kk/skills/image-authoring/references/style-extraction.md +139 -0
- package/plugins/kk/workflows/kk-daily-ai-voice.yaml +130 -30
- package/plugins/publishings/emdash-pub/dist/index.js +22263 -0
- package/plugins/publishings/emdash-pub/plugin.json +1 -1
- package/plugins/publishings/podcast-pub/dist/index.js +22650 -0
- package/plugins/publishings/podcast-pub/plugin.json +8 -2
- package/plugins/publishings/podcast-pub/src/index.ts +18 -2
- package/plugins/publishings/podcast-pub/src/show-notes.ts +56 -9
- package/plugins/publishings/qiita-pub/dist/index.js +22101 -0
- package/plugins/publishings/qiita-pub/plugin.json +1 -1
- package/plugins/publishings/surfdash-pub/dist/index.js +22323 -0
- package/plugins/publishings/surfdash-pub/plugin.json +1 -1
- package/plugins/publishings/surfdash-pub/src/index.ts +109 -9
- package/plugins/publishings/zenn-pub/dist/index.js +22142 -0
- package/plugins/publishings/zenn-pub/plugin.json +1 -1
- package/plugins/sp/scripts/batch-preflight.mjs +346 -0
- package/plugins/sp/scripts/batch-preflight.ts +459 -0
- package/plugins/sp/scripts/daily-summary/daily-summary.mjs +615 -0
- package/plugins/sp/scripts/daily-summary/daily-summary.ts +846 -0
- package/plugins/sp/scripts/daily-summary/logger.ts +28 -0
- package/plugins/sp/scripts/dogfood-testing/detect-pipeline-driving.mjs +223 -0
- package/plugins/sp/scripts/dogfood-testing/detect-pipeline-driving.ts +367 -0
- package/plugins/sp/scripts/dogfood-testing/validate-report.mjs +132 -0
- package/plugins/sp/scripts/dogfood-testing/validate-report.ts +169 -0
- package/plugins/sp/scripts/feature-dev-precheck.mjs +171 -0
- package/plugins/sp/scripts/feature-dev-precheck.ts +238 -0
- package/plugins/sp/scripts/feature-sync-bounded.mjs +285 -0
- package/plugins/sp/scripts/feature-sync-bounded.ts +478 -0
- package/plugins/sp/scripts/history-anatomy-cache.mjs +902 -0
- package/plugins/sp/scripts/history-anatomy-cache.ts +1028 -0
- package/plugins/sp/scripts/idea-handoff.mjs +22 -0
- package/plugins/sp/scripts/idea-handoff.ts +44 -0
- package/plugins/sp/scripts/inline-pipeline-parity-check.ts +185 -0
- package/plugins/sp/scripts/inline-run-setup.ts +198 -0
- package/plugins/sp/scripts/pr-reviewing.mjs +769 -0
- package/plugins/sp/scripts/pr-reviewing.ts +925 -0
- package/plugins/sp/scripts/quality-gate.mjs +179 -0
- package/plugins/sp/scripts/quality-gate.ts +217 -0
- package/plugins/sp/scripts/script-contract-check.ts +319 -0
- package/plugins/sp/scripts/stage-registry-adapter.ts +1533 -0
- package/plugins/sp/scripts/surface-drift-inventory.ts +929 -0
- package/plugins/sp/scripts/task-evidence-precheck.ts +181 -0
- package/plugins/sp/scripts/task-size-precheck.ts +175 -0
- package/plugins/sp/scripts/transition-shim-check.ts +238 -0
- package/plugins/sp/scripts/validate-commands.ts +689 -0
- package/plugins/sp/scripts/validate-flag-contracts.ts +878 -0
- package/plugins/sp/scripts/verify-answer-lint.ts +530 -0
- package/plugins/sp/scripts/workflow-step-profile.mjs +316 -0
- package/plugins/sp/scripts/workflow-step-profile.ts +456 -0
- package/plugins/sp/scripts/wrapup-steps.mjs +373 -0
- package/plugins/sp/scripts/wrapup-steps.ts +466 -0
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "podcast-pub",
|
|
3
3
|
"kind": "publish",
|
|
4
|
-
"entry": "./
|
|
4
|
+
"entry": "./dist/index.js",
|
|
5
5
|
"version": "1.0.0",
|
|
6
|
-
"description": "Publish plugin for a self-hosted microfeed instance: podcast episodes via the Bearer-authenticated /api/v1/ REST API plus item management operations"
|
|
6
|
+
"description": "Publish plugin for a self-hosted microfeed instance: podcast episodes via the Bearer-authenticated /api/v1/ REST API plus item management operations",
|
|
7
|
+
"operations": {
|
|
8
|
+
"show-notes": {
|
|
9
|
+
"input": "doc-list",
|
|
10
|
+
"output": "markdown"
|
|
11
|
+
}
|
|
12
|
+
}
|
|
7
13
|
}
|
|
@@ -28,6 +28,10 @@ interface PodcastPubOptions {
|
|
|
28
28
|
title?: unknown;
|
|
29
29
|
runDate?: unknown;
|
|
30
30
|
articleBaseUrl?: unknown;
|
|
31
|
+
/** Brief/timeline render flag (task 0118). */
|
|
32
|
+
briefMode?: unknown;
|
|
33
|
+
/** Surfdash publish result `metadata.postPath` (briefMode URL source). */
|
|
34
|
+
articlePostPath?: unknown;
|
|
31
35
|
/** Episode-assembly options for the `publish` op (absorb publish-prep's merge; additive). */
|
|
32
36
|
audioFile?: unknown;
|
|
33
37
|
coverPath?: unknown;
|
|
@@ -76,7 +80,10 @@ function resolveItemId(options: PodcastPubOptions): { itemId: string } | { error
|
|
|
76
80
|
}
|
|
77
81
|
|
|
78
82
|
/** Options the `show-notes` operation reads on the payload (a subset of {@link PodcastPubOptions}). */
|
|
79
|
-
type ShowNotesOpOptions = Pick<
|
|
83
|
+
type ShowNotesOpOptions = Pick<
|
|
84
|
+
PodcastPubOptions,
|
|
85
|
+
'docs' | 'title' | 'runDate' | 'articleBaseUrl' | 'briefMode' | 'articlePostPath'
|
|
86
|
+
>;
|
|
80
87
|
|
|
81
88
|
/**
|
|
82
89
|
* Option-then-env resolution for the show-notes render options: `kk executor run`
|
|
@@ -103,8 +110,17 @@ function resolveShowNotesRenderOptions(
|
|
|
103
110
|
return { error: 'options.runDate (or PODCAST_PUB_RUN_DATE) is required for the "show-notes" operation' };
|
|
104
111
|
}
|
|
105
112
|
const articleBaseUrl = resolveOptionString(options.articleBaseUrl, 'PODCAST_PUB_ARTICLE_BASE_URL');
|
|
113
|
+
const briefModeRaw = options.briefMode ?? process.env.PODCAST_PUB_BRIEF_MODE;
|
|
114
|
+
const briefMode = briefModeRaw === true || briefModeRaw === 'true' || briefModeRaw === '1';
|
|
115
|
+
const articlePostPath = resolveOptionString(options.articlePostPath, 'PODCAST_PUB_ARTICLE_POST_PATH');
|
|
106
116
|
return {
|
|
107
|
-
renderOptions: {
|
|
117
|
+
renderOptions: {
|
|
118
|
+
title,
|
|
119
|
+
runDate,
|
|
120
|
+
...(articleBaseUrl !== undefined ? { articleBaseUrl } : {}),
|
|
121
|
+
...(briefMode ? { briefMode: true } : {}),
|
|
122
|
+
...(articlePostPath !== undefined ? { articlePostPath } : {}),
|
|
123
|
+
},
|
|
108
124
|
};
|
|
109
125
|
}
|
|
110
126
|
|
|
@@ -82,6 +82,20 @@ export interface ShowNotesRenderOptions {
|
|
|
82
82
|
runDate: string;
|
|
83
83
|
/** Article base URL; defaults to the production site (surfing.salty.vip). */
|
|
84
84
|
articleBaseUrl?: string;
|
|
85
|
+
/**
|
|
86
|
+
* Brief/timeline mode (task 0118): per-item 1–2-sentence briefing + `HH:MM`
|
|
87
|
+
* timestamp + per-item article link. When no surfdash article path is
|
|
88
|
+
* available the render degrades to the legacy full-body layout — never
|
|
89
|
+
* throws, never invents a URL.
|
|
90
|
+
*/
|
|
91
|
+
briefMode?: boolean;
|
|
92
|
+
/**
|
|
93
|
+
* Absolute surfdash `metadata.postPath` from the publish result
|
|
94
|
+
* (`content/posts/articles/<locale>/<slug>/index.md`); the article URL is
|
|
95
|
+
* derived O(1) from its slug+locale — authoritative over the title/runDate
|
|
96
|
+
* slug construction, which stays the fallback.
|
|
97
|
+
*/
|
|
98
|
+
articlePostPath?: string;
|
|
85
99
|
}
|
|
86
100
|
|
|
87
101
|
/**
|
|
@@ -101,7 +115,18 @@ export function renderShowNotesMarkdown(docs: Doc[], opts: ShowNotesRenderOption
|
|
|
101
115
|
.replace(/[\s_]+/g, '-');
|
|
102
116
|
return s.length > 0 ? s : 'post';
|
|
103
117
|
};
|
|
104
|
-
const
|
|
118
|
+
const baseUrl = opts.articleBaseUrl ?? 'https://surfing.salty.vip';
|
|
119
|
+
// O(1) postPath derivation (task 0118): the published slug + locale come from
|
|
120
|
+
// the real path, not from re-slugging the title. Falls back to the legacy
|
|
121
|
+
// title/runDate construction when no postPath exists (surfdash failed).
|
|
122
|
+
const segments = opts.articlePostPath?.split(/[\\/]/).filter((s) => s.length > 0) ?? [];
|
|
123
|
+
const postSlug = segments.length >= 2 ? (segments[segments.length - 2] ?? '') : '';
|
|
124
|
+
const postLocale = segments.find((s) => ['zh', 'en', 'ja'].includes(s)) ?? 'zh';
|
|
125
|
+
const articleUrl =
|
|
126
|
+
postSlug.length > 0
|
|
127
|
+
? `${baseUrl}/${postLocale}/posts/${postSlug}`
|
|
128
|
+
: `${baseUrl}/zh/posts/${opts.runDate}-${slugify(opts.title)}`;
|
|
129
|
+
const briefMode = opts.briefMode === true && postSlug.length > 0;
|
|
105
130
|
const sourceLabel = (d: Doc): string => {
|
|
106
131
|
const m = d.metadata ?? {};
|
|
107
132
|
if (typeof m.sourceName === 'string' && m.sourceName.trim()) return m.sourceName.trim();
|
|
@@ -111,6 +136,23 @@ export function renderShowNotesMarkdown(docs: Doc[], opts: ShowNotesRenderOption
|
|
|
111
136
|
return '来源';
|
|
112
137
|
}
|
|
113
138
|
};
|
|
139
|
+
const itemBrief = (d: Doc): string => {
|
|
140
|
+
const meta = d.metadata ?? {};
|
|
141
|
+
if (typeof meta.brief === 'string' && meta.brief.trim().length > 0) return meta.brief.trim();
|
|
142
|
+
return (d.body ?? '')
|
|
143
|
+
.trim()
|
|
144
|
+
.split(/(?<=[。!?])\s*/)
|
|
145
|
+
.slice(0, 2)
|
|
146
|
+
.join('');
|
|
147
|
+
};
|
|
148
|
+
const itemTimestamp = (d: Doc): string => {
|
|
149
|
+
const meta = d.metadata ?? {};
|
|
150
|
+
const raw = meta.publishAt;
|
|
151
|
+
const t = typeof raw === 'string' ? Date.parse(raw) : typeof raw === 'number' ? raw : Number.NaN;
|
|
152
|
+
if (!Number.isFinite(t)) return '--:--';
|
|
153
|
+
const at = new Date(t);
|
|
154
|
+
return `${String(at.getHours()).padStart(2, '0')}:${String(at.getMinutes()).padStart(2, '0')}`;
|
|
155
|
+
};
|
|
114
156
|
const lines: string[] = [`# ${opts.title}`, ''];
|
|
115
157
|
docs.forEach((d, i) => {
|
|
116
158
|
const body = (d.body ?? '').trim();
|
|
@@ -118,14 +160,19 @@ export function renderShowNotesMarkdown(docs: Doc[], opts: ShowNotesRenderOption
|
|
|
118
160
|
.split(/(?<=[。!?])\s*/)
|
|
119
161
|
.slice(0, 2)
|
|
120
162
|
.join('');
|
|
121
|
-
lines.push(
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
163
|
+
lines.push(`## ${i + 1}. ${d.title ?? `条目 ${i + 1}`}`, '');
|
|
164
|
+
if (briefMode) {
|
|
165
|
+
// Timeline entry: HH:MM + 1–2-sentence briefing; the trailing link pair
|
|
166
|
+
// ends with the surfdash article URL (task 0118 R2.1–R2.4).
|
|
167
|
+
lines.push(
|
|
168
|
+
`${itemTimestamp(d)} · ${itemBrief(d)}`,
|
|
169
|
+
'',
|
|
170
|
+
`[来源:${sourceLabel(d)}](${d.sourceUri ?? ''}) · [文章](${articleUrl})`,
|
|
171
|
+
'',
|
|
172
|
+
);
|
|
173
|
+
} else {
|
|
174
|
+
lines.push(sentences, '', `[来源:${sourceLabel(d)}](${d.sourceUri ?? ''})`, '');
|
|
175
|
+
}
|
|
129
176
|
});
|
|
130
177
|
lines.push(`详情见本期完整文章:[ ${opts.title} ](${articleUrl})`, '');
|
|
131
178
|
return lines.join('\n');
|