@kindgi/types 0.1.4-rc.0 → 0.1.4-rc.2
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/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/live.d.ts +39 -0
- package/dist/live.d.ts.map +1 -0
- package/dist/live.js +4 -0
- package/dist/live.js.map +1 -0
- package/package.json +1 -1
- package/src/index.ts +1 -0
- package/src/live.ts +40 -0
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,mBAAmB,aAAa,CAAC;AACjC,mBAAmB,WAAW,CAAC;AAC/B,mBAAmB,UAAU,CAAC;AAC9B,mBAAmB,WAAW,CAAC;AAC/B,mBAAmB,aAAa,CAAC;AACjC,mBAAmB,eAAe,CAAC;AACnC,mBAAmB,cAAc,CAAC;AAKlC,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,mBAAmB,aAAa,CAAC;AACjC,mBAAmB,WAAW,CAAC;AAC/B,mBAAmB,UAAU,CAAC;AAC9B,mBAAmB,WAAW,CAAC;AAC/B,mBAAmB,WAAW,CAAC;AAC/B,mBAAmB,aAAa,CAAC;AACjC,mBAAmB,eAAe,CAAC;AACnC,mBAAmB,cAAc,CAAC;AAKlC,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC"}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,iCAAiC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,iCAAiC;AAWjC,uEAAuE;AACvE,qEAAqE;AACrE,+DAA+D;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC"}
|
package/dist/live.d.ts
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { OrgId, ProjectId } from './ids.js';
|
|
2
|
+
/**
|
|
3
|
+
* One step of an app-defined finer scope, below a project: the app passes
|
|
4
|
+
* them with a run as an ordered path from coarse to fine, e.g.
|
|
5
|
+
* `company=acme` then `role=cfo`.
|
|
6
|
+
*/
|
|
7
|
+
export interface ScopeSegment {
|
|
8
|
+
readonly key: string;
|
|
9
|
+
readonly value: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Where a live version is pinned, from least to most specific: the
|
|
13
|
+
* agent's default for the tenant, an org, a project, or a segment path
|
|
14
|
+
* within a project. A run takes the most specific pin that covers it; a
|
|
15
|
+
* segment pin covers every run whose path starts with it.
|
|
16
|
+
*/
|
|
17
|
+
export type LiveScope = {
|
|
18
|
+
readonly kind: 'tenant';
|
|
19
|
+
} | {
|
|
20
|
+
readonly kind: 'org';
|
|
21
|
+
readonly orgId: OrgId;
|
|
22
|
+
} | {
|
|
23
|
+
readonly kind: 'project';
|
|
24
|
+
readonly projectId: ProjectId;
|
|
25
|
+
} | {
|
|
26
|
+
readonly kind: 'segment';
|
|
27
|
+
readonly projectId: ProjectId;
|
|
28
|
+
readonly path: readonly ScopeSegment[];
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Why a run used its agent version: named by the caller (`explicit`), held
|
|
32
|
+
* by the flow version a flow's agent step runs in (`flow-pin`: its node's
|
|
33
|
+
* `config.version`, else the version the flow version pinned when it was
|
|
34
|
+
* published), the conversation's own (`conversation`), the version live
|
|
35
|
+
* for the run's scope (`live`), or the latest registered, nothing being
|
|
36
|
+
* live (`latest`).
|
|
37
|
+
*/
|
|
38
|
+
export type AgentVersionVia = 'explicit' | 'flow-pin' | 'conversation' | 'live' | 'latest';
|
|
39
|
+
//# sourceMappingURL=live.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"live.d.ts","sourceRoot":"","sources":["../src/live.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAEjD;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED;;;;;GAKG;AACH,MAAM,MAAM,SAAS,GACjB;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAA;CAAE,GAC3B;IAAE,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAA;CAAE,GAC/C;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAA;CAAE,GAC3D;IACE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B,QAAQ,CAAC,IAAI,EAAE,SAAS,YAAY,EAAE,CAAC;CACxC,CAAC;AAEN;;;;;;;GAOG;AACH,MAAM,MAAM,eAAe,GAAG,UAAU,GAAG,UAAU,GAAG,cAAc,GAAG,MAAM,GAAG,QAAQ,CAAC"}
|
package/dist/live.js
ADDED
package/dist/live.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"live.js","sourceRoot":"","sources":["../src/live.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,iCAAiC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kindgi/types",
|
|
3
|
-
"version": "0.1.4-rc.
|
|
3
|
+
"version": "0.1.4-rc.2",
|
|
4
4
|
"description": "Foundational TypeScript types shared across Kindgi. Branded IDs, timestamps, hashes, refs, Result, list filter / page shapes. Zero runtime dependencies; the only runtime export is the makeEnvName validator.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
package/src/index.ts
CHANGED
package/src/live.ts
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
// Copyright (C) 2026 Kindgi Inc.
|
|
3
|
+
|
|
4
|
+
import type { OrgId, ProjectId } from './ids.js';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* One step of an app-defined finer scope, below a project: the app passes
|
|
8
|
+
* them with a run as an ordered path from coarse to fine, e.g.
|
|
9
|
+
* `company=acme` then `role=cfo`.
|
|
10
|
+
*/
|
|
11
|
+
export interface ScopeSegment {
|
|
12
|
+
readonly key: string;
|
|
13
|
+
readonly value: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Where a live version is pinned, from least to most specific: the
|
|
18
|
+
* agent's default for the tenant, an org, a project, or a segment path
|
|
19
|
+
* within a project. A run takes the most specific pin that covers it; a
|
|
20
|
+
* segment pin covers every run whose path starts with it.
|
|
21
|
+
*/
|
|
22
|
+
export type LiveScope =
|
|
23
|
+
| { readonly kind: 'tenant' }
|
|
24
|
+
| { readonly kind: 'org'; readonly orgId: OrgId }
|
|
25
|
+
| { readonly kind: 'project'; readonly projectId: ProjectId }
|
|
26
|
+
| {
|
|
27
|
+
readonly kind: 'segment';
|
|
28
|
+
readonly projectId: ProjectId;
|
|
29
|
+
readonly path: readonly ScopeSegment[];
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Why a run used its agent version: named by the caller (`explicit`), held
|
|
34
|
+
* by the flow version a flow's agent step runs in (`flow-pin`: its node's
|
|
35
|
+
* `config.version`, else the version the flow version pinned when it was
|
|
36
|
+
* published), the conversation's own (`conversation`), the version live
|
|
37
|
+
* for the run's scope (`live`), or the latest registered, nothing being
|
|
38
|
+
* live (`latest`).
|
|
39
|
+
*/
|
|
40
|
+
export type AgentVersionVia = 'explicit' | 'flow-pin' | 'conversation' | 'live' | 'latest';
|