{"_id":"@bun-win32/taskschd","_rev":"3-01dad9c4277afa65fc35d19249265f0d","name":"@bun-win32/taskschd","dist-tags":{"latest":"2.0.1"},"versions":{"1.0.0":{"name":"@bun-win32/taskschd","version":"1.0.0","keywords":["bindings","bun","com","dll","ffi","taskschd","taskscheduler","typescript","win32","windows","workflow"],"author":"Stev Peifer <stev@bell.net>","license":"MIT","_id":"@bun-win32/taskschd@1.0.0","maintainers":[{"name":"obscuritysrl","email":"stev@bell.net"}],"homepage":"https://github.com/ObscuritySRL/bun-win32#readme","bugs":{"url":"https://github.com/ObscuritySRL/bun-win32/issues"},"dist":{"shasum":"5dd99f912eadea9b9b5977742d71f841ed4fc1ae","tarball":"https://registry.npmjs.org/@bun-win32/taskschd/-/taskschd-1.0.0.tgz","fileCount":6,"integrity":"sha512-kx/gzWjD4q4EA5yZzqfqhEr4gLtec+LwK/eod+TWE2y63OAbtR8CBKqkOcBPLhOTSYwJ2xpZ/5MGYadAnT3vMA==","signatures":[{"sig":"MEQCIBS5Ls5Dz6bcqM/oqCOniwFiC2DGN5agEzH9A9GfYlLxAiALz8T8nUw5ufv0UOnE9Dp+u62P7jhXh35eioBAwX/xeA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":8665},"main":"./index.ts","type":"module","module":"index.ts","shasum":"5dd99f912eadea9b9b5977742d71f841ed4fc1ae","engines":{"bun":">=1.1.0"},"exports":{".":"./index.ts"},"private":false,"scripts":{"example:task-service-audit":"bun ./example/task-service-audit.ts","example:schedule-constellation":"bun ./example/schedule-constellation.ts"},"_npmUser":{"name":"obscuritysrl","email":"stev@bell.net"},"_integrity":"sha512-kx/gzWjD4q4EA5yZzqfqhEr4gLtec+LwK/eod+TWE2y63OAbtR8CBKqkOcBPLhOTSYwJ2xpZ/5MGYadAnT3vMA==","repository":{"url":"git://github.com/ObscuritySRL/bun-win32.git","type":"git","directory":"packages/taskschd"},"_npmVersion":"10.8.3","description":"Zero-dependency, zero-overhead Win32 Task Scheduler COM server entry-point bindings for Bun (FFI) on Windows.","directories":{},"sideEffects":false,"_nodeVersion":"24.3.0","dependencies":{"@bun-win32/core":"1.1.2"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/taskschd_1.0.0_1775847607900_0.7745090262761023","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"name":"@bun-win32/taskschd","version":"2.0.0","keywords":["bindings","bun","com","dll","ffi","taskschd","taskscheduler","typescript","win32","windows","workflow"],"author":"Stev Peifer <stev.p@outlook.com>","license":"MIT","_id":"@bun-win32/taskschd@2.0.0","maintainers":[{"name":"obscuritysrl","email":"stev.p@outlook.com"}],"homepage":"https://github.com/ObscuritySRL/bun-win32#readme","bugs":{"url":"https://github.com/ObscuritySRL/bun-win32/issues"},"dist":{"shasum":"81a3d40b1c68b0c9b8afe3326ed566ceea82a43c","tarball":"https://registry.npmjs.org/@bun-win32/taskschd/-/taskschd-2.0.0.tgz","fileCount":6,"integrity":"sha512-lr3QHJIfn+018alWhZZteyh7VRUgPWeqsaNybGyYz3FA1EyylXp5G+XE4K1zMRtLXAoPxfop/kg2cKk+PaX2IA==","signatures":[{"sig":"MEUCIDFoS0YKEhNNNwc2o7+eoUy6KRXSM6XryE6HXaSRkOVYAiEAhzBjhPSe7yDoa5K/hmkSStTTRNQXD5m+s9JVoL3RA/Q=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":9918},"main":"./index.ts","type":"module","module":"index.ts","shasum":"81a3d40b1c68b0c9b8afe3326ed566ceea82a43c","engines":{"bun":">=1.1.0"},"exports":{".":"./index.ts"},"private":false,"scripts":{"example:task-service-audit":"bun ./example/task-service-audit.ts","example:schedule-constellation":"bun ./example/schedule-constellation.ts"},"_npmUser":{"name":"obscuritysrl","email":"stev.p@outlook.com"},"_integrity":"sha512-lr3QHJIfn+018alWhZZteyh7VRUgPWeqsaNybGyYz3FA1EyylXp5G+XE4K1zMRtLXAoPxfop/kg2cKk+PaX2IA==","repository":{"url":"git://github.com/ObscuritySRL/bun-win32.git","type":"git","directory":"packages/taskschd"},"_npmVersion":"10.8.3","description":"Zero-dependency, zero-overhead Win32 Task Scheduler COM server entry-point bindings for Bun (FFI) on Windows.","directories":{},"sideEffects":false,"_nodeVersion":"26.3.0","dependencies":{"@bun-win32/core":"2.0.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/taskschd_2.0.0_1782435967327_0.5025992001744262","host":"s3://npm-registry-packages-npm-production"}},"2.0.1":{"author":"Stev Peifer <stev.p@outlook.com>","bugs":{"url":"https://github.com/ObscuritySRL/bun-win32/issues"},"dependencies":{"@bun-win32/core":"2.0.1"},"description":"Zero-dependency, zero-overhead Win32 Task Scheduler COM server entry-point bindings for Bun (FFI) on Windows.","devDependencies":{"@types/bun":"latest"},"exports":{".":"./index.ts"},"license":"MIT","module":"index.ts","name":"@bun-win32/taskschd","peerDependencies":{"typescript":"^5"},"private":false,"homepage":"https://github.com/ObscuritySRL/bun-win32#readme","repository":{"type":"git","url":"git://github.com/ObscuritySRL/bun-win32.git","directory":"packages/taskschd"},"type":"module","version":"2.0.1","main":"./index.ts","keywords":["bindings","bun","com","dll","ffi","taskschd","taskscheduler","typescript","win32","windows","workflow"],"sideEffects":false,"engines":{"bun":">=1.1.0"},"scripts":{"example:schedule-constellation":"bun ./example/schedule-constellation.ts","example:task-service-audit":"bun ./example/task-service-audit.ts"},"_id":"@bun-win32/taskschd@2.0.1","_integrity":"sha512-YTgVSHHqeytRJ78rzhORA16Fjo9PAPcJBzDD0TO7y7PRdiozHaPRuv8jshWonJKNjv4vqJ6RsXpHjAwQWpORdQ==","_nodeVersion":"26.3.0","_npmVersion":"10.8.3","shasum":"e9776d2bdbe058ec2cb4b13a1a294c598aff30a0","dist":{"integrity":"sha512-YTgVSHHqeytRJ78rzhORA16Fjo9PAPcJBzDD0TO7y7PRdiozHaPRuv8jshWonJKNjv4vqJ6RsXpHjAwQWpORdQ==","shasum":"e9776d2bdbe058ec2cb4b13a1a294c598aff30a0","tarball":"https://registry.npmjs.org/@bun-win32/taskschd/-/taskschd-2.0.1.tgz","fileCount":6,"unpackedSize":9918,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIHO5sHNiB0wv+TpdJ1SCiq+qclfO3DgsaTEdPkvO1mNnAiEA3c8vHxL36z/PiGbXUGB5kPbGgZcAuAQW0EY3rTMDEC4="}]},"_npmUser":{"name":"obscuritysrl","email":"stev.p@outlook.com"},"directories":{},"maintainers":[{"name":"obscuritysrl","email":"stev.p@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/taskschd_2.0.1_1782438173597_0.3756837380087068"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-10T19:00:07.780Z","modified":"2026-06-26T01:42:53.887Z","1.0.0":"2026-04-10T19:00:08.041Z","2.0.0":"2026-06-26T01:06:07.473Z","2.0.1":"2026-06-26T01:42:53.767Z"},"bugs":{"url":"https://github.com/ObscuritySRL/bun-win32/issues"},"author":"Stev Peifer <stev.p@outlook.com>","license":"MIT","homepage":"https://github.com/ObscuritySRL/bun-win32#readme","keywords":["bindings","bun","com","dll","ffi","taskschd","taskscheduler","typescript","win32","windows","workflow"],"repository":{"type":"git","url":"git://github.com/ObscuritySRL/bun-win32.git","directory":"packages/taskschd"},"description":"Zero-dependency, zero-overhead Win32 Task Scheduler COM server entry-point bindings for Bun (FFI) on Windows.","maintainers":[{"name":"obscuritysrl","email":"stev.p@outlook.com"}],"readme":"# @bun-win32/taskschd\n\nZero-dependency, zero-overhead Win32 Taskschd bindings for [Bun](https://bun.sh) on Windows.\n\n## Overview\n\n`@bun-win32/taskschd` exposes the documented `taskschd.dll` exports using [Bun](https://bun.sh)'s FFI. It provides a single class, `Taskschd`, which lazily binds native symbols on first use. You can optionally preload a subset or all symbols up-front via `Preload()`.\n\nThe package intentionally stays export-accurate: `taskschd.dll` exports the COM server entry points, not the `ITaskService` methods themselves. The runnable examples show how to activate `CLSID_TaskScheduler` through `DllGetClassObject` and then drive the Task Scheduler COM interfaces through their vtables.\n\n## Features\n\n- [Bun](https://bun.sh)-first ergonomics on Windows 10/11.\n- Direct FFI to `taskschd.dll` (Task Scheduler COM server entry points).\n- In-source docs in `structs/Taskschd.ts` with links to Microsoft Learn.\n- Lazy binding on first call; optional eager preload (`Taskschd.Preload()`).\n- No wrapper overhead; calls map 1:1 to native exports.\n- Strongly-typed COM pointer aliases for `DllGetClassObject` (see `types/Taskschd.ts`).\n\r\n## Requirements\r\n\r\n- [Bun](https://bun.sh) runtime\r\n- Windows 10 or later\r\n\r\n## Installation\r\n\r\n```sh\r\nbun add @bun-win32/taskschd\r\n```\r\n\r\n## Quick Start\n\n```ts\nimport Taskschd from '@bun-win32/taskschd';\n\nTaskschd.Preload(['DllCanUnloadNow', 'DllGetClassObject']);\n\nconst unloadStatus = Taskschd.DllCanUnloadNow();\nconsole.log(`DllCanUnloadNow -> 0x${(unloadStatus >>> 0).toString(16).padStart(8, '0')}`);\n```\n\r\n> [!NOTE]\r\n> AI agents: see `AI.md` for the package binding contract and source-navigation guidance. It explains how to use the package without scanning the entire implementation.\r\n\r\n## Examples\r\n\r\nRun the included examples:\r\n\r\n```sh\nbun run example:schedule-constellation\nbun run example:task-service-audit\n```\n\n## Notes\n\n- Either rely on lazy binding or call `Taskschd.Preload()`.\n- `taskschd.dll` exports `DllCanUnloadNow`, `DllGetClassObject`, `DllRegisterServer`, and `DllUnregisterServer`.\n- The Task Scheduler object model itself is COM-based. Use `DllGetClassObject` to obtain an `IClassFactory`, create `ITaskService`, and then call the interface vtables as shown in `example/task-service-audit.ts` and `example/schedule-constellation.ts`.\n- `DllRegisterServer` and `DllUnregisterServer` mutate COM registration. Do not call them casually from end-user code.\n- Windows only. Bun runtime required.\n- **SAL types & naming:** nullability is in the **type** — `Optional<T>` (formally optional, SAL `_*opt_`) and `Nullable<T>` (plain `[in]`/`[out]` the docs say can be NULL), the null sentinel derived from `T` (`null` for pointers `LP*`/`P*`, `0n` for handles/by-value addresses); direction is in the **parameter name** — `_out` (`_Out_`), `_in_out` (`_Inout_`), `_In_` bare. See `AI.md` and the repo `AGENTS.md`.\n","readmeFilename":"README.md"}