mirror of
https://github.com/iflytek/skillhub.git
synced 2026-11-24 22:08:02 +00:00
Some checks failed
Deploy Docs / build (push) Has been cancelled
Security / Dependency Review (push) Has been cancelled
Security / CodeQL (java-kotlin) (push) Has been cancelled
Security / CodeQL (javascript-typescript) (push) Has been cancelled
Security / CodeQL (python) (push) Has been cancelled
Deploy Docs / Deploy (push) Has been cancelled
Add the native SkillHub plugin for DeepSeek Harness with a scoped skill center, conversation search/install tools, exact-version installation and protected lifecycle management. Prepare the independently versioned 0.1.0 npm candidate with an empty default Registry and documented compatibility limits. Keep formal specifications and executable regression tests; remove archived development screenshots and runtime reports from the final tree. Review fixes cover independent scopes, installed references, pre-staging recovery and idempotent discovery. Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
17 lines
986 B
TypeScript
17 lines
986 B
TypeScript
import { expect, test } from 'bun:test';
|
|
import { operationDiagnostic } from '../src/host/operation-diagnostic.js';
|
|
import type { NativeOperation } from '../src/host/generated/native-contract.js';
|
|
|
|
const operation = { operationId: 'operation', kind: 'install' } as NativeOperation;
|
|
test('execution diagnostics expose only operation identity and allowlisted categories', () => {
|
|
for (const [error, expected] of [
|
|
[Object.assign(new Error('/private/token=secret'), { code: 'EPERM', path: '/private' }), 'EPERM'],
|
|
[{ code: 'ECONNRESET', url: 'https://secret@example.test' }, 'ECONNRESET'],
|
|
[{ exitCode: 6, details: { token: 'secret' } }, 'VALIDATION'],
|
|
[{ code: 'secret', exitCode: 4 }, 'FILESYSTEM'],
|
|
[{ code: 'secret', exitCode: 99 }, 'UNCLASSIFIED'],
|
|
[new Error('secret'), 'UNCLASSIFIED'], [null, 'UNCLASSIFIED'],
|
|
] as const) {
|
|
expect(operationDiagnostic(operation, error)).toEqual({ operationId: 'operation', kind: 'install', code: expected });
|
|
}
|
|
});
|