mirror of
https://github.com/deepseek-ai/deepseek-harness.git
synced 2026-09-14 04:01:35 +00:00
111 lines
5.2 KiB
TypeScript
111 lines
5.2 KiB
TypeScript
/**
|
|
* Context provenance projection: the role and producer name a transcript row
|
|
* shows for one logged non-user message, read from the durable source alone.
|
|
*/
|
|
|
|
import { describe, expect, it } from 'vitest'
|
|
import {
|
|
contextForm, contextProvenance, sessionRecallLabels,
|
|
} from '../src/client/conversation-nodes/event-projection.ts'
|
|
|
|
describe('contextProvenance', () => {
|
|
it('names a plugin producer by its logged plugin id', () => {
|
|
expect(contextProvenance({ kind: 'plugin', plugin: 'dsh-tool-skill' }))
|
|
.toEqual({ role: 'inject', label: 'dsh-tool-skill' })
|
|
})
|
|
|
|
it('names an explicitly invoked skill', () => {
|
|
expect(contextProvenance({ kind: 'skill-invocation', name: 'review' }))
|
|
.toEqual({ role: 'inject', label: 'review' })
|
|
})
|
|
|
|
it('names workspace instructions by the files they reconciled, deduplicated in first-seen order', () => {
|
|
expect(contextProvenance({
|
|
kind: 'agent-instructions',
|
|
baseline: true,
|
|
changes: [
|
|
{ action: 'set', scope: '. |