@acpfx/core 0.4.0 → 0.4.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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @acpfx/core
2
2
 
3
+ ## 0.4.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 05c4208: Embed manifest.yaml via include_str in native binaries (no hardcoded inline). Fix realpathSync for npx symlink manifest resolution. Remove speaker dep from audio-player.
8
+
3
9
  ## 0.4.0
4
10
 
5
11
  ### 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,28 @@
1
+ # @acpfx/core
2
+
3
+ Shared types, Zod schemas, and manifest utilities for acpfx nodes. This package contains the generated TypeScript types and validation schemas derived from the canonical Rust schema definitions.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install @acpfx/core
9
+ ```
10
+
11
+ ## What's Included
12
+
13
+ - **Generated types** -- TypeScript interfaces for all event types (`audio.chunk`, `speech.final`, `agent.delta`, etc.)
14
+ - **Zod schemas** -- Runtime validation for events
15
+ - **Manifest utilities** -- Helpers for loading and validating `manifest.yaml` files
16
+ - **Protocol helpers** -- Event construction and parsing
17
+
18
+ ## Usage
19
+
20
+ ```typescript
21
+ import { AudioChunkEvent, SpeechFinalEvent } from "@acpfx/core";
22
+ ```
23
+
24
+ Types are generated from the Rust schema crate via `cargo run -p acpfx-schema --bin acpfx-codegen`.
25
+
26
+ ## License
27
+
28
+ ISC
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acpfx/core",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
package/src/manifest.ts CHANGED
@@ -10,6 +10,7 @@
10
10
 
11
11
  import { readFileSync } from "node:fs";
12
12
  import { join, dirname } from "node:path";
13
+ import { fileURLToPath } from "node:url";
13
14
  import { z } from "zod";
14
15
 
15
16
  // ---- Manifest Types ----
@@ -126,16 +127,11 @@ export function handleManifestFlag(manifestPath?: string): void {
126
127
  */
127
128
  function printManifest(manifestPath?: string): void {
128
129
  if (!manifestPath) {
129
- const script = process.argv[1];
130
- const scriptDir = dirname(script);
131
- const scriptBase = script.replace(/\.[^.]+$/, "");
132
- const colocated = `${scriptBase}.manifest.json`;
133
- try {
134
- readFileSync(colocated);
135
- manifestPath = colocated;
136
- } catch {
137
- manifestPath = join(scriptDir, "manifest.json");
138
- }
130
+ // Use import.meta.url to find the bundle's real location on disk.
131
+ // This works even when invoked via npx symlinks in .bin/ because
132
+ // import.meta.url resolves to the actual file, not the symlink.
133
+ const bundleDir = dirname(fileURLToPath(import.meta.url));
134
+ manifestPath = join(bundleDir, "manifest.json");
139
135
  }
140
136
 
141
137
  try {