@hmharness/domain-ops 0.7.0 → 0.8.1

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/dist/index.d.ts CHANGED
@@ -37,10 +37,19 @@ export declare function latestBrief(home: string): Promise<{
37
37
  date: string;
38
38
  text: string;
39
39
  } | null>;
40
+ /** One watched upstream repo, human-labelled - UI layers print these,
41
+ * never the bare keys (oh-ace means nothing to a person at a terminal). */
42
+ export interface RadarSourceInfo {
43
+ key: string;
44
+ label: string;
45
+ repo: string;
46
+ }
47
+ /** Human one-liner for the source list: 'OpenHarmony 文档 (openharmony/docs) · …' */
48
+ export declare function describeSources(list?: RadarSourceInfo[]): string;
40
49
  export declare function opsStatus(home: string): Promise<{
41
50
  scans: number;
42
51
  lastScan?: string;
43
- sources: string[];
52
+ sources: RadarSourceInfo[];
44
53
  }>;
45
54
  export declare const harmonyOpsRadarScan: Tool;
46
55
  export declare const harmonyOpsRadarBrief: Tool;
package/dist/index.js CHANGED
@@ -202,13 +202,17 @@ export async function latestBrief(home) {
202
202
  return null;
203
203
  }
204
204
  }
205
+ /** Human one-liner for the source list: 'OpenHarmony 文档 (openharmony/docs) · …' */
206
+ export function describeSources(list = DEFAULT_SOURCES) {
207
+ return list.map((s) => `${s.label} (${s.repo})`).join(' · ');
208
+ }
205
209
  export async function opsStatus(home) {
206
210
  const lines = (await readFile(join(opsDir(home), 'ops-log.jsonl'), 'utf8').catch(() => '')).trim().split('\n').filter(Boolean);
207
211
  const last = lines[lines.length - 1];
208
212
  return {
209
213
  scans: lines.length,
210
214
  lastScan: last ? JSON.parse(last).time : undefined,
211
- sources: DEFAULT_SOURCES.map((s) => s.key),
215
+ sources: DEFAULT_SOURCES.map((s) => ({ key: s.key, label: s.label, repo: s.repo })),
212
216
  };
213
217
  }
214
218
  /* ------------------------------------------------------------------ */
@@ -249,7 +253,7 @@ export const harmonyOpsStatus = {
249
253
  parameters: { type: 'object', properties: {}, required: [] },
250
254
  async execute(_args, ctx) {
251
255
  const s = await opsStatus(ctx.home);
252
- return { output: `scans: ${s.scans}${s.lastScan ? ` · last: ${s.lastScan}` : ''}\nsources: ${s.sources.join(', ')}` };
256
+ return { output: `scans: ${s.scans}${s.lastScan ? ` · last: ${s.lastScan}` : ''}\nwatching: ${describeSources(s.sources)}` };
253
257
  },
254
258
  };
255
259
  export const opsTools = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hmharness/domain-ops",
3
- "version": "0.7.0",
3
+ "version": "0.8.1",
4
4
  "description": "hmharness ops keeper: ecosystem radar (OpenHarmony release tracking, snapshot diff, model brief with template fallback). Rewrite of the old line's hm-keeper per its captured behavior spec.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -15,7 +15,7 @@
15
15
  "build": "tsc -p tsconfig.build.json"
16
16
  },
17
17
  "dependencies": {
18
- "@hmharness/kernel": "0.7.0"
18
+ "@hmharness/kernel": "0.8.0"
19
19
  },
20
20
  "files": [
21
21
  "dist"