nexus-ai-pro 1.16.0 → 1.17.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.
- package/API_STABILITY.md +14 -0
- package/CHANGELOG.md +50 -1
- package/README.md +38 -2316
- package/dist/cli/db.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/postgres/index.d.ts +2 -1
- package/dist/postgres/index.js +4 -1
- package/dist/postgres/prompts.d.ts +50 -0
- package/dist/postgres/prompts.js +102 -0
- package/dist/prompts/client.d.ts +79 -0
- package/dist/prompts/client.js +133 -0
- package/dist/prompts/diff.d.ts +53 -0
- package/dist/prompts/diff.js +108 -0
- package/dist/prompts/errors.d.ts +73 -0
- package/dist/prompts/errors.js +59 -0
- package/dist/prompts/evaluate.d.ts +26 -0
- package/dist/prompts/evaluate.js +22 -0
- package/dist/prompts/file.d.ts +45 -0
- package/dist/prompts/file.js +117 -0
- package/dist/prompts/gates.d.ts +38 -0
- package/dist/prompts/gates.js +65 -0
- package/dist/prompts/index.d.ts +12 -0
- package/dist/prompts/index.js +4 -0
- package/dist/prompts/memory.d.ts +44 -0
- package/dist/prompts/memory.js +62 -0
- package/dist/prompts/redis.d.ts +78 -0
- package/dist/prompts/redis.js +96 -0
- package/dist/prompts/registry-entry.d.ts +13 -0
- package/dist/prompts/registry-entry.js +6 -0
- package/dist/prompts/registry.d.ts +168 -0
- package/dist/prompts/registry.js +231 -0
- package/dist/prompts/template.d.ts +112 -0
- package/dist/prompts/template.js +149 -0
- package/dist/prompts/variant.d.ts +7 -0
- package/dist/prompts/variant.js +22 -0
- package/dist/prompts/version.d.ts +15 -0
- package/dist/prompts/version.js +24 -0
- package/dist/prompts/webhooks.d.ts +11 -0
- package/dist/prompts/webhooks.js +24 -0
- package/dist/tracing/instrument.js +1 -0
- package/dist/types/messages.d.ts +22 -2
- package/dist/types/prompts.d.ts +182 -0
- package/dist/types/prompts.js +1 -0
- package/dist/types/voice.d.ts +2 -2
- package/dist-cjs/cli/db.js +1 -1
- package/dist-cjs/index.d.ts +1 -1
- package/dist-cjs/postgres/index.d.ts +2 -1
- package/dist-cjs/postgres/index.js +7 -2
- package/dist-cjs/postgres/prompts.d.ts +50 -0
- package/dist-cjs/postgres/prompts.js +107 -0
- package/dist-cjs/prompts/client.d.ts +79 -0
- package/dist-cjs/prompts/client.js +137 -0
- package/dist-cjs/prompts/diff.d.ts +53 -0
- package/dist-cjs/prompts/diff.js +113 -0
- package/dist-cjs/prompts/errors.d.ts +73 -0
- package/dist-cjs/prompts/errors.js +68 -0
- package/dist-cjs/prompts/evaluate.d.ts +26 -0
- package/dist-cjs/prompts/evaluate.js +58 -0
- package/dist-cjs/prompts/file.d.ts +45 -0
- package/dist-cjs/prompts/file.js +124 -0
- package/dist-cjs/prompts/gates.d.ts +38 -0
- package/dist-cjs/prompts/gates.js +102 -0
- package/dist-cjs/prompts/index.d.ts +12 -0
- package/dist-cjs/prompts/index.js +19 -0
- package/dist-cjs/prompts/memory.d.ts +44 -0
- package/dist-cjs/prompts/memory.js +66 -0
- package/dist-cjs/prompts/redis.d.ts +78 -0
- package/dist-cjs/prompts/redis.js +100 -0
- package/dist-cjs/prompts/registry-entry.d.ts +13 -0
- package/dist-cjs/prompts/registry-entry.js +19 -0
- package/dist-cjs/prompts/registry.d.ts +168 -0
- package/dist-cjs/prompts/registry.js +268 -0
- package/dist-cjs/prompts/template.d.ts +112 -0
- package/dist-cjs/prompts/template.js +154 -0
- package/dist-cjs/prompts/variant.d.ts +7 -0
- package/dist-cjs/prompts/variant.js +25 -0
- package/dist-cjs/prompts/version.d.ts +15 -0
- package/dist-cjs/prompts/version.js +28 -0
- package/dist-cjs/prompts/webhooks.d.ts +11 -0
- package/dist-cjs/prompts/webhooks.js +28 -0
- package/dist-cjs/tracing/instrument.js +1 -0
- package/dist-cjs/types/messages.d.ts +22 -2
- package/dist-cjs/types/prompts.d.ts +182 -0
- package/dist-cjs/types/prompts.js +2 -0
- package/dist-cjs/types/voice.d.ts +2 -2
- package/package.json +84 -2
package/API_STABILITY.md
CHANGED
|
@@ -412,6 +412,20 @@ The `nexus-ai-pro/postgres` subpaths, `nexus-ai-pro/ops/circuit-store`, and
|
|
|
412
412
|
so recordings made with one release keep replaying with the next. A change that would invalidate
|
|
413
413
|
recordings waits for 2.0.
|
|
414
414
|
|
|
415
|
+
## Prompt stages (1.17.0)
|
|
416
|
+
|
|
417
|
+
The `nexus-ai-pro/prompts` subpaths and `nexus-ai-pro/postgres/prompts` are experimental in
|
|
418
|
+
production readiness, as the image family is: their exported types, functions, and classes follow the
|
|
419
|
+
1.x semantic versioning rules, and the experimental label does not permit an incompatible minor or
|
|
420
|
+
patch release. None is exported from the root.
|
|
421
|
+
|
|
422
|
+
- The content version algorithm is a guarantee. `promptVersion()` gives the same version for the
|
|
423
|
+
same content in every 1.x release, so an upgrade never re-versions a committed prompt.
|
|
424
|
+
- Version, label, and history records only gain fields in the 1.x line, and the Postgres schema
|
|
425
|
+
follows the additive rule above.
|
|
426
|
+
- The wording of gate reasons, of the note a forced promotion records, and of `formatPromptDiff()`
|
|
427
|
+
output is for people and may improve in any release.
|
|
428
|
+
|
|
415
429
|
## Deprecation process
|
|
416
430
|
|
|
417
431
|
Deprecated APIs are marked with `@deprecated` in declarations and described in the changelog. Removals
|
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,54 @@ Notable changes to this project are recorded here. The format follows [Keep a Ch
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [1.17.0] - 2026-09-23
|
|
8
|
+
|
|
9
|
+
Prompt versioning, and documentation you can navigate. Prompts are defined with typed variables,
|
|
10
|
+
versioned by their content, promoted between labels only after their gates agree, and served through
|
|
11
|
+
registry outages; every feature now has its own guide, and the README is an overview that links to them.
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- **Prompt templates** (`nexus-ai-pro/prompts`). `definePrompt()` types a prompt's variables from its
|
|
16
|
+
template text, so a missing or misspelled variable is a compile-time error. Templates support dot
|
|
17
|
+
paths, partials, placeholders for whole messages, defaults, and a request configuration versioned
|
|
18
|
+
with the prompt. `promptVersion()` derives a version from the content, identical in every runtime.
|
|
19
|
+
- **A prompt registry** (`nexus-ai-pro/prompts/registry`). `PromptRegistry` commits versions, points
|
|
20
|
+
labels such as `staging` and `production` at them, and records every change. `promote()` runs the
|
|
21
|
+
gates registered for the destination label: `experimentGate()` requires a passing experiment for
|
|
22
|
+
the exact version, with thresholds and an optional no-regression check, and `servedByGate()` requires
|
|
23
|
+
a version to be served by another label first. `rollback()`, `split()` for sticky A/B tests, and
|
|
24
|
+
`diff()` with `formatPromptDiff()` complete it. Label writes are compare-and-set, and changes can be
|
|
25
|
+
posted to signed webhooks, verified with `verifyPromptWebhook()`.
|
|
26
|
+
- **`evaluatePrompt()`**, the headless playground: runs a prompt version over a dataset and stores an
|
|
27
|
+
experiment tagged with that version, which is what `experimentGate()` looks for.
|
|
28
|
+
- **A serving client** (`nexus-ai-pro/prompts/client`). `PromptClient` caches labels with a TTL and a
|
|
29
|
+
stale-while-revalidate window, shares concurrent refreshes, keeps serving the last version seen when
|
|
30
|
+
the registry is unreachable, falls back to prompts bundled in code on a cold start, and picks a
|
|
31
|
+
sticky A/B arm per key.
|
|
32
|
+
- **Prompt stores**: `MemoryPromptStore`, `FilePromptStore` (`/prompts/file`), `RedisPromptStore`
|
|
33
|
+
(`/prompts/redis`), and `PostgresPromptStore` (`/postgres/prompts`), all tested against one
|
|
34
|
+
contract. `postgresMigration()` and `nexus db sql` include the prompt tables.
|
|
35
|
+
- A model call traced with `traceModelClient()` records the prompt name, version, label, and arm it
|
|
36
|
+
was rendered from.
|
|
37
|
+
- **A guide for every feature**, under `docs/`. Each guide covers every export of its entry points and
|
|
38
|
+
ends with a reference generated from the doc comments. `npm run docs:guides` fails when an export
|
|
39
|
+
is not named in a guide or a reference is stale, and runs in `npm test`; `npm run docs:update`
|
|
40
|
+
regenerates the references.
|
|
41
|
+
- `BinaryBuffer`: Node's `Buffer` when Node's types are loaded, otherwise `Uint8Array`.
|
|
42
|
+
|
|
43
|
+
### Changed
|
|
44
|
+
|
|
45
|
+
- The README is an overview that links to the guides; the moved sections live in `docs/`, and the
|
|
46
|
+
size table is in `docs/packaging.md`.
|
|
47
|
+
- The combined Postgres migration creates three more tables, for prompts.
|
|
48
|
+
|
|
49
|
+
### Fixed
|
|
50
|
+
|
|
51
|
+
- The message types referred to Node's `Buffer` and `NodeJS.ReadableStream`, so a project without
|
|
52
|
+
Node's type definitions, such as a browser app, failed to type-check anything that reached them.
|
|
53
|
+
They now compile either way, and are unchanged for Node projects.
|
|
54
|
+
|
|
7
55
|
## [1.16.0] - 2026-09-22
|
|
8
56
|
|
|
9
57
|
Shared state and the command line. Everything that has to outlive a process or be shared between
|
|
@@ -846,7 +894,8 @@ shared policy vocabulary is in place for a future release that revisits this.
|
|
|
846
894
|
- URL fetching rejects unsafe private-network targets and limits response reads.
|
|
847
895
|
- CLI and audit findings no longer disclose detected secret values.
|
|
848
896
|
|
|
849
|
-
[Unreleased]: https://github.com/mkhitar-abrahamyan/nexus-ai/compare/v1.
|
|
897
|
+
[Unreleased]: https://github.com/mkhitar-abrahamyan/nexus-ai/compare/v1.17.0...HEAD
|
|
898
|
+
[1.17.0]: https://github.com/mkhitar-abrahamyan/nexus-ai/compare/v1.16.0...v1.17.0
|
|
850
899
|
[1.16.0]: https://github.com/mkhitar-abrahamyan/nexus-ai/compare/v1.15.0...v1.16.0
|
|
851
900
|
[1.15.0]: https://github.com/mkhitar-abrahamyan/nexus-ai/compare/v1.14.0...v1.15.0
|
|
852
901
|
[1.14.0]: https://github.com/mkhitar-abrahamyan/nexus-ai/compare/v1.12.0...v1.14.0
|