@nixet/contracts 0.1.1 → 0.1.3
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 +20 -0
- package/dist/cjs/domains/agents.d.ts +18 -0
- package/dist/cjs/domains/agents.js +19 -2
- package/dist/esm/domains/agents.js +18 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,26 @@ All notable changes to `@nixet/contracts` are recorded here, following
|
|
|
4
4
|
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and
|
|
5
5
|
[Semantic Versioning](https://semver.org/).
|
|
6
6
|
|
|
7
|
+
## [0.1.3] — 2026-11-30
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- `PROVIDER_KEY_SECRETS` and `KeyedProvider`: the secret names a workspace
|
|
12
|
+
stores its own provider key under, `openai-api-key` and `anthropic-api-key`.
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
|
|
16
|
+
- The `provider` field of a model configuration now says that `openai` and
|
|
17
|
+
`anthropic` run on your own key, stored as that secret.
|
|
18
|
+
|
|
19
|
+
## [0.1.2] — 2026-11-10
|
|
20
|
+
|
|
21
|
+
### Changed
|
|
22
|
+
|
|
23
|
+
- Released alongside `@nixet/sdk` 0.1.2, with the `repository` and `bugs`
|
|
24
|
+
links pointing at [github.com/nixetai/sdk](https://github.com/nixetai/sdk).
|
|
25
|
+
No schema changes.
|
|
26
|
+
|
|
7
27
|
## [0.1.1] — 2026-11-10
|
|
8
28
|
|
|
9
29
|
### Added
|
|
@@ -49,6 +49,24 @@ export declare const tierSchema: z.ZodEnum<{
|
|
|
49
49
|
powerful: "powerful";
|
|
50
50
|
}>;
|
|
51
51
|
export type Tier = z.infer<typeof tierSchema>;
|
|
52
|
+
/**
|
|
53
|
+
* Where a workspace keeps its own key for each provider that needs one.
|
|
54
|
+
*
|
|
55
|
+
* `openai` and `anthropic` run on the customer's key, never on Nixet's: the
|
|
56
|
+
* key is stored as a secret with this name in the environment the run belongs
|
|
57
|
+
* to, written once and never readable back. A run on one of these providers
|
|
58
|
+
* is refused before it starts when the secret is missing. `nix` is managed and
|
|
59
|
+
* needs none.
|
|
60
|
+
*
|
|
61
|
+
* Fixed names rather than a field on the version, so rotating a key is one
|
|
62
|
+
* secret update that every agent picks up on its next run, and a published
|
|
63
|
+
* version never records which credential paid for it.
|
|
64
|
+
*/
|
|
65
|
+
export declare const PROVIDER_KEY_SECRETS: {
|
|
66
|
+
readonly openai: "openai-api-key";
|
|
67
|
+
readonly anthropic: "anthropic-api-key";
|
|
68
|
+
};
|
|
69
|
+
export type KeyedProvider = keyof typeof PROVIDER_KEY_SECRETS;
|
|
52
70
|
export declare const modelSchema: z.ZodObject<{
|
|
53
71
|
provider: z.ZodDefault<z.ZodEnum<{
|
|
54
72
|
nix: "nix";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createAgentVersionSchema = exports.agentVersionSchema = exports.VARIABLE_PATTERN = exports.MAX_VARIABLE_VALUE = exports.variableNameSchema = exports.agentSkillSchema = exports.toolRefSchema = exports.modelSchema = exports.tierSchema = exports.providerSchema = exports.createAgentSchema = exports.agentSchema = exports.MAX_INSTRUCTIONS = exports.MAX_AGENT_NAME = void 0;
|
|
3
|
+
exports.createAgentVersionSchema = exports.agentVersionSchema = exports.VARIABLE_PATTERN = exports.MAX_VARIABLE_VALUE = exports.variableNameSchema = exports.agentSkillSchema = exports.toolRefSchema = exports.modelSchema = exports.PROVIDER_KEY_SECRETS = exports.tierSchema = exports.providerSchema = exports.createAgentSchema = exports.agentSchema = exports.MAX_INSTRUCTIONS = exports.MAX_AGENT_NAME = void 0;
|
|
4
4
|
exports.variablesIn = variablesIn;
|
|
5
5
|
exports.applyVariables = applyVariables;
|
|
6
6
|
const zod_1 = require("zod");
|
|
@@ -55,11 +55,28 @@ exports.providerSchema = zod_1.z.enum(["nix", "openai", "anthropic"]);
|
|
|
55
55
|
* request. Callers who need an exact model bring their own provider key.
|
|
56
56
|
*/
|
|
57
57
|
exports.tierSchema = zod_1.z.enum(["fast", "balanced", "powerful"]);
|
|
58
|
+
/**
|
|
59
|
+
* Where a workspace keeps its own key for each provider that needs one.
|
|
60
|
+
*
|
|
61
|
+
* `openai` and `anthropic` run on the customer's key, never on Nixet's: the
|
|
62
|
+
* key is stored as a secret with this name in the environment the run belongs
|
|
63
|
+
* to, written once and never readable back. A run on one of these providers
|
|
64
|
+
* is refused before it starts when the secret is missing. `nix` is managed and
|
|
65
|
+
* needs none.
|
|
66
|
+
*
|
|
67
|
+
* Fixed names rather than a field on the version, so rotating a key is one
|
|
68
|
+
* secret update that every agent picks up on its next run, and a published
|
|
69
|
+
* version never records which credential paid for it.
|
|
70
|
+
*/
|
|
71
|
+
exports.PROVIDER_KEY_SECRETS = {
|
|
72
|
+
openai: "openai-api-key",
|
|
73
|
+
anthropic: "anthropic-api-key",
|
|
74
|
+
};
|
|
58
75
|
exports.modelSchema = zod_1.z
|
|
59
76
|
.object({
|
|
60
77
|
provider: exports.providerSchema
|
|
61
78
|
.default("nix")
|
|
62
|
-
.describe("`nix` is managed and needs no key of your own."),
|
|
79
|
+
.describe("`nix` is managed and needs no key of your own. `openai` and `anthropic` run on your own key, stored as the secret `openai-api-key` or `anthropic-api-key`."),
|
|
63
80
|
model: zod_1.z
|
|
64
81
|
.string()
|
|
65
82
|
.min(1)
|
|
@@ -50,11 +50,28 @@ export const providerSchema = z.enum(["nix", "openai", "anthropic"]);
|
|
|
50
50
|
* request. Callers who need an exact model bring their own provider key.
|
|
51
51
|
*/
|
|
52
52
|
export const tierSchema = z.enum(["fast", "balanced", "powerful"]);
|
|
53
|
+
/**
|
|
54
|
+
* Where a workspace keeps its own key for each provider that needs one.
|
|
55
|
+
*
|
|
56
|
+
* `openai` and `anthropic` run on the customer's key, never on Nixet's: the
|
|
57
|
+
* key is stored as a secret with this name in the environment the run belongs
|
|
58
|
+
* to, written once and never readable back. A run on one of these providers
|
|
59
|
+
* is refused before it starts when the secret is missing. `nix` is managed and
|
|
60
|
+
* needs none.
|
|
61
|
+
*
|
|
62
|
+
* Fixed names rather than a field on the version, so rotating a key is one
|
|
63
|
+
* secret update that every agent picks up on its next run, and a published
|
|
64
|
+
* version never records which credential paid for it.
|
|
65
|
+
*/
|
|
66
|
+
export const PROVIDER_KEY_SECRETS = {
|
|
67
|
+
openai: "openai-api-key",
|
|
68
|
+
anthropic: "anthropic-api-key",
|
|
69
|
+
};
|
|
53
70
|
export const modelSchema = z
|
|
54
71
|
.object({
|
|
55
72
|
provider: providerSchema
|
|
56
73
|
.default("nix")
|
|
57
|
-
.describe("`nix` is managed and needs no key of your own."),
|
|
74
|
+
.describe("`nix` is managed and needs no key of your own. `openai` and `anthropic` run on your own key, stored as the secret `openai-api-key` or `anthropic-api-key`."),
|
|
58
75
|
model: z
|
|
59
76
|
.string()
|
|
60
77
|
.min(1)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nixet/contracts",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Public Nixet request, response and event schemas shared by the API, clients and bindings.",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -32,11 +32,11 @@
|
|
|
32
32
|
"homepage": "https://nixet.ai",
|
|
33
33
|
"repository": {
|
|
34
34
|
"type": "git",
|
|
35
|
-
"url": "git+https://github.com/
|
|
35
|
+
"url": "git+https://github.com/nixetai/sdk.git",
|
|
36
36
|
"directory": "packages/contracts"
|
|
37
37
|
},
|
|
38
38
|
"bugs": {
|
|
39
|
-
"url": "https://github.com/
|
|
39
|
+
"url": "https://github.com/nixetai/sdk/issues"
|
|
40
40
|
},
|
|
41
41
|
"keywords": [
|
|
42
42
|
"nixet",
|