@acpfx/node-sdk 0.2.0 → 0.3.1
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.
- package/CHANGELOG.md +26 -0
- package/LICENSE +15 -0
- package/README.md +36 -0
- package/package.json +2 -2
- package/src/index.ts +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# @acpfx/node-sdk
|
|
2
2
|
|
|
3
|
+
## 0.3.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [05c4208]
|
|
8
|
+
- @acpfx/core@0.4.1
|
|
9
|
+
|
|
10
|
+
## 0.3.0
|
|
11
|
+
|
|
12
|
+
### Minor Changes
|
|
13
|
+
|
|
14
|
+
- 0e6838e: Add local on-device STT and TTS nodes (no API keys required). Introduces --acpfx-\* flag convention with setup phase for first-time model downloads, dynamic release pipeline with dual CPU/CUDA builds, MLX acceleration on Mac, and TUI improvements for speech event display.
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- Updated dependencies [0e6838e]
|
|
19
|
+
- @acpfx/core@0.4.0
|
|
20
|
+
|
|
21
|
+
## 0.2.1
|
|
22
|
+
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- Updated dependencies [79c6694]
|
|
26
|
+
- Updated dependencies [a0320a1]
|
|
27
|
+
- @acpfx/core@0.3.0
|
|
28
|
+
|
|
3
29
|
## 0.2.0
|
|
4
30
|
|
|
5
31
|
### Minor Changes
|
package/LICENSE
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
ISC License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024-2026 acpfx contributors
|
|
4
|
+
|
|
5
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
+
purpose with or without fee is hereby granted, provided that the above
|
|
7
|
+
copyright notice and this permission notice appear in all copies.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
10
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
11
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
12
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
13
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
14
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
15
|
+
PERFORMANCE OF THIS SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# @acpfx/node-sdk
|
|
2
|
+
|
|
3
|
+
SDK for authoring acpfx pipeline nodes. Provides the standard primitives for emitting events, logging, and handling the NDJSON stdio protocol.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @acpfx/node-sdk
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## API
|
|
12
|
+
|
|
13
|
+
- **`emit(event)`** -- Send an event to stdout (NDJSON)
|
|
14
|
+
- **`log.info(msg)` / `log.warn(msg)` / `log.error(msg)`** -- Structured logging via `log` events
|
|
15
|
+
- **`onEvent(callback)`** -- Register a handler for incoming events on stdin
|
|
16
|
+
- **`handleManifestFlag()`** -- Handle `--manifest` CLI flag (prints manifest JSON and exits)
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
```typescript
|
|
21
|
+
import { emit, log, onEvent, handleManifestFlag } from "@acpfx/node-sdk";
|
|
22
|
+
|
|
23
|
+
handleManifestFlag();
|
|
24
|
+
|
|
25
|
+
onEvent((event) => {
|
|
26
|
+
if (event.type === "audio.chunk") {
|
|
27
|
+
// process audio...
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
emit({ type: "lifecycle.ready" });
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## License
|
|
35
|
+
|
|
36
|
+
ISC
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Node SDK — shared helpers for acpfx TS nodes.
|
|
3
3
|
*
|
|
4
|
-
* Provides emit(), log(), onEvent(), and
|
|
4
|
+
* Provides emit(), log(), onEvent(), and handleAcpfxFlags().
|
|
5
5
|
* log() emits structured log events on stdout (not stderr).
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import { createInterface, type Interface } from "node:readline";
|
|
9
9
|
/**
|
|
10
|
-
* Re-export
|
|
11
|
-
*
|
|
10
|
+
* Re-export handleAcpfxFlags from core — handles all --acpfx-* convention flags.
|
|
11
|
+
* Call at the top of your node's entry point before any async work.
|
|
12
12
|
*/
|
|
13
|
-
export { handleManifestFlag } from "@acpfx/core";
|
|
13
|
+
export { handleAcpfxFlags, handleManifestFlag } from "@acpfx/core";
|
|
14
14
|
|
|
15
15
|
const NODE_NAME = process.env.ACPFX_NODE_NAME ?? "unknown";
|
|
16
16
|
|