Skip to main content

WrittenFile

@a16njs/models


@a16njs/models / WrittenFile

Interface: WrittenFile

Defined in: plugin.ts:18

Information about a file that was written.

Properties

path

path: string

Defined in: plugin.ts:20

Path to the written file


type

type: CustomizationType

Defined in: plugin.ts:22

Type of customization written


itemCount

itemCount: number

Defined in: plugin.ts:24

How many models went into this file (1 for 1:1, more if merged)


isNewFile

isNewFile: boolean

Defined in: plugin.ts:26

True if this file was created fresh; false if merged/edited existing


sourceItems?

optional sourceItems: AgentCustomization[]

Defined in: plugin.ts:32

Which source AgentCustomizations contributed to this output file. Optional for backwards compatibility. Enables accurate git-ignore conflict detection in match mode.


sourcePaths?

optional sourcePaths: string[]

Defined in: plugin.ts:46

Explicit source-relative paths this output file represents, used by path-rewriting. When set (and non-empty), takes precedence over sourceItems[*].sourcePath for buildMapping purposes.

Use for outputs that correspond to source paths that are not first-class AgentCustomizations — e.g., AgentSkillIO resource files (scripts/, references/, assets/*) whose underlying sourceItems points at the skill's SKILL.md.

Paths must use POSIX separators to match the normalization applied in buildMapping.