Skip to content

ProjectWorkerContext

Project acquisition inputs plus this worker’s immutable string ID and numeric index. Resource names still need session identity to separate simultaneous runs.

Property Modifier Type Description Inherited from
config readonly Readonly<Config> - ProjectContext.config
onCleanup readonly (cleanup: () => unknown) => void Register one owned release during acquisition. Callbacks run once in reverse order after app work stops, including when setup throws. Do not reuse the aborted acquisition signal for cleanup or register work after the factory settles. ProjectContext.onCleanup
session readonly { id: string; } The CLI session’s stable random ID. It survives watch reruns and differs between simultaneous CLI invocations. ProjectContext.session
session.id readonly string - -
signal readonly AbortSignal - ProjectContext.signal
worker readonly { id: string; index: number; } - -
worker.id readonly string - -
worker.index readonly number - -