@primafuture/systemd-tasks 1.1.0 → 1.2.0

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.
@@ -399,6 +399,24 @@ interface ObservedStartResult {
399
399
  /** Klientem vlastněný stream, který lze kdykoliv lokálně odpojit. */
400
400
  readonly observation: ObservedTaskObservation;
401
401
  }
402
+ /** Opt-in dokončení hostového tasku nezávislé na životnosti původního klienta. */
403
+ interface ObservedFinalizationOptions {
404
+ /** Konečný příkaz po potvrzeném cleanupu a release; nedostává výstup ani task spec. */
405
+ readonly afterRelease: ObservedTaskSpec;
406
+ /** Jeden budget od potvrzení konce payloadu pro čtení, cleanup, release a příkaz; stop grace je zvlášť. */
407
+ readonly timeoutMs: number;
408
+ }
409
+ /** Přijetí finalizeru není důkazem jeho budoucího dokončení nebo úspěchu callbacku. */
410
+ interface ObservedFinalizationReceipt {
411
+ /** Opakovaná shodná registrace nepřidá druhý finalizer ani callback. */
412
+ readonly outcome: 'accepted' | 'already-registered';
413
+ /** Odvozená manager-owned jednotka dokončení tohoto exact tasku. */
414
+ readonly unitName: string;
415
+ /** Manager, ve kterém byla registrace ověřena nebo přijata. */
416
+ readonly manager: ManagerIdentity;
417
+ /** Přijatý start job, nebo null u již existující registrace. */
418
+ readonly jobPath: string | null;
419
+ }
402
420
  /** Lifecycle observed tasků sdílí manager a mutation pravidla se základním klientem. */
403
421
  interface ObservedTaskClient {
404
422
  /** Manager identity pevná po celou dobu tohoto spojení. */
@@ -415,6 +433,8 @@ interface ObservedTaskClient {
415
433
  stop(reference: ObservedTaskReference, options?: StopOptions): Promise<ObservedStopReceipt>;
416
434
  /** Uvolní retention až po potvrzeném cleanupu obou procesních služeb. */
417
435
  release(reference: ObservedTaskReference, options?: ReleaseOptions): Promise<ReleaseReceipt>;
436
+ /** Předá dokončení systemd; neukončuje aktivní task a přežívá disconnect klienta. */
437
+ finalizeAfterCompletion(reference: ObservedTaskReference, options: ObservedFinalizationOptions): Promise<ObservedFinalizationReceipt>;
418
438
  /** Odpojí všechny output observations a D-Bus bez zastavení tasků. */
419
439
  disconnect(): Promise<void>;
420
440
  }
@@ -464,4 +484,4 @@ declare function prepareObserved(spec: ObservedTaskSpec): ObservedTaskIntent;
464
484
  /** Prepare an intention locally; no connection, file opening, or process start occurs. */
465
485
  declare function prepare(spec: TaskSpec): TaskIntent;
466
486
 
467
- export { type CleanupState, type ConnectOptions, type DiagnosticEvent, type ErrorCode, type ErrorDetails, type LookupResult, type ManagerIdentity, type ObservedLookupResult, type ObservedOutputEvent, type ObservedProcessSnapshot, type ObservedStartOptions, type ObservedStartReceipt, type ObservedStartResult, type ObservedStopReceipt, type ObservedTaskClient, type ObservedTaskIdentity, type ObservedTaskIntent, type ObservedTaskObservation, type ObservedTaskReference, type ObservedTaskSnapshot, type ObservedTaskSpec, type ReleaseOptions, type ReleaseReceipt, type StartReceipt, type StopOptions, type StopReceipt, type SystemdProperty, type TaskClient, TaskError, type TaskEvidence, type TaskIO, type TaskIdentity, type TaskInput, type TaskIntent, type TaskOutput, type TaskReference, type TaskResult, type TaskSnapshot, type TaskSpec, type WaitOptions, connect, connectObserved, nullIO, prepare, prepareObserved };
487
+ export { type CleanupState, type ConnectOptions, type DiagnosticEvent, type ErrorCode, type ErrorDetails, type LookupResult, type ManagerIdentity, type ObservedFinalizationOptions, type ObservedFinalizationReceipt, type ObservedLookupResult, type ObservedOutputEvent, type ObservedProcessSnapshot, type ObservedStartOptions, type ObservedStartReceipt, type ObservedStartResult, type ObservedStopReceipt, type ObservedTaskClient, type ObservedTaskIdentity, type ObservedTaskIntent, type ObservedTaskObservation, type ObservedTaskReference, type ObservedTaskSnapshot, type ObservedTaskSpec, type ReleaseOptions, type ReleaseReceipt, type StartReceipt, type StopOptions, type StopReceipt, type SystemdProperty, type TaskClient, TaskError, type TaskEvidence, type TaskIO, type TaskIdentity, type TaskInput, type TaskIntent, type TaskOutput, type TaskReference, type TaskResult, type TaskSnapshot, type TaskSpec, type WaitOptions, connect, connectObserved, nullIO, prepare, prepareObserved };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primafuture/systemd-tasks",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "type": "module",
5
5
  "description": "One-shot process tasks owned by the systemd user manager.",
6
6
  "author": "PrimaFuture.cz s.r.o. <dev@primafuture.cz>",