@kindgi/types 0.1.2 → 0.1.4-rc.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/dist/filter.d.ts +15 -1
- package/dist/filter.d.ts.map +1 -1
- package/dist/version.d.ts +25 -0
- package/dist/version.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/filter.ts +12 -1
- package/src/version.ts +27 -0
package/dist/filter.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Brand } from './ids.js';
|
|
1
|
+
import type { Brand, OrgId, ProjectId } from './ids.js';
|
|
2
2
|
import type { Timestamp } from './temporal.js';
|
|
3
3
|
/**
|
|
4
4
|
* Opaque pagination cursor. Producers return a `Cursor`; consumers pass
|
|
@@ -58,4 +58,18 @@ export interface Page<T> {
|
|
|
58
58
|
readonly nextCursor?: Cursor;
|
|
59
59
|
readonly truncated?: boolean;
|
|
60
60
|
}
|
|
61
|
+
/**
|
|
62
|
+
* A list's content scope: one project's records, or those of every
|
|
63
|
+
* project in an org. Absent: the whole tenant. Lists of content (runs,
|
|
64
|
+
* approvals, conversations, provenance) take it; on the wire it is
|
|
65
|
+
* `?scopeKind=project|org&scopeId=…`. It narrows a list, it isn't an
|
|
66
|
+
* authorization boundary.
|
|
67
|
+
*/
|
|
68
|
+
export type ListScope = {
|
|
69
|
+
readonly kind: 'project';
|
|
70
|
+
readonly projectId: ProjectId;
|
|
71
|
+
} | {
|
|
72
|
+
readonly kind: 'org';
|
|
73
|
+
readonly orgId: OrgId;
|
|
74
|
+
};
|
|
61
75
|
//# sourceMappingURL=filter.d.ts.map
|
package/dist/filter.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filter.d.ts","sourceRoot":"","sources":["../src/filter.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"filter.d.ts","sourceRoot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33
|
readonly id: Id;
|
|
34
34
|
readonly version: Semver;
|
|
35
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* Why the runtime registered a version of an agent or flow under another
|
|
38
|
+
* number than its definition names. Versions never change, so a deploy
|
|
39
|
+
* whose definition's version is registered already with other content
|
|
40
|
+
* registers the next free version in its line instead:
|
|
41
|
+
*
|
|
42
|
+
* - `pins-changed`: the definition's version is registered with other
|
|
43
|
+
* pins (a block it uses has a new version);
|
|
44
|
+
* - `unpinned`: the definition's version was published before pins
|
|
45
|
+
* existed, so it has none;
|
|
46
|
+
* - `version-taken`: the definition's version holds another definition;
|
|
47
|
+
* - `edited`: derived from an existing version with some data-block pins
|
|
48
|
+
* swapped (an expert's edit), not from a definition at all.
|
|
49
|
+
*/
|
|
50
|
+
export type VersionDerivationReason = 'pins-changed' | 'unpinned' | 'version-taken' | 'edited';
|
|
51
|
+
/** The version a version was registered in place of (or derived from), and why. */
|
|
52
|
+
export interface VersionDerivation {
|
|
53
|
+
/** The version the definition names, or the one an edit derived from. */
|
|
54
|
+
readonly version: string;
|
|
55
|
+
readonly reason: VersionDerivationReason;
|
|
56
|
+
/** For an edit: a short label for the version (e.g. "warmer tone"). */
|
|
57
|
+
readonly label?: string;
|
|
58
|
+
/** For an edit: who made it (`user:<id>`, or the token for a key). */
|
|
59
|
+
readonly by?: string;
|
|
60
|
+
}
|
|
36
61
|
//# sourceMappingURL=version.d.ts.map
|
package/dist/version.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEtC;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;AAE7C;;;;;GAKG;AACH,MAAM,MAAM,WAAW,GAAG,KAAK,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;AAEvD;;;;;;;;;GASG;AACH,MAAM,WAAW,YAAY,CAAC,EAAE,SAAS,MAAM;IAC7C,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC;IAChB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B"}
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEtC;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;AAE7C;;;;;GAKG;AACH,MAAM,MAAM,WAAW,GAAG,KAAK,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;AAEvD;;;;;;;;;GASG;AACH,MAAM,WAAW,YAAY,CAAC,EAAE,SAAS,MAAM;IAC7C,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC;IAChB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,uBAAuB,GAAG,cAAc,GAAG,UAAU,GAAG,eAAe,GAAG,QAAQ,CAAC;AAE/F,mFAAmF;AACnF,MAAM,WAAW,iBAAiB;IAChC,yEAAyE;IACzE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,uBAAuB,CAAC;IACzC,uEAAuE;IACvE,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,sEAAsE;IACtE,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;CACtB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kindgi/types",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4-rc.0",
|
|
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/filter.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// SPDX-License-Identifier: Apache-2.0
|
|
2
2
|
// Copyright (C) 2026 Kindgi Inc.
|
|
3
3
|
|
|
4
|
-
import type { Brand } from './ids.js';
|
|
4
|
+
import type { Brand, OrgId, ProjectId } from './ids.js';
|
|
5
5
|
import type { Timestamp } from './temporal.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -64,3 +64,14 @@ export interface Page<T> {
|
|
|
64
64
|
readonly nextCursor?: Cursor;
|
|
65
65
|
readonly truncated?: boolean;
|
|
66
66
|
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* A list's content scope: one project's records, or those of every
|
|
70
|
+
* project in an org. Absent: the whole tenant. Lists of content (runs,
|
|
71
|
+
* approvals, conversations, provenance) take it; on the wire it is
|
|
72
|
+
* `?scopeKind=project|org&scopeId=…`. It narrows a list, it isn't an
|
|
73
|
+
* authorization boundary.
|
|
74
|
+
*/
|
|
75
|
+
export type ListScope =
|
|
76
|
+
| { readonly kind: 'project'; readonly projectId: ProjectId }
|
|
77
|
+
| { readonly kind: 'org'; readonly orgId: OrgId };
|
package/src/version.ts
CHANGED
|
@@ -39,3 +39,30 @@ export interface VersionedRef<Id extends string> {
|
|
|
39
39
|
readonly id: Id;
|
|
40
40
|
readonly version: Semver;
|
|
41
41
|
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Why the runtime registered a version of an agent or flow under another
|
|
45
|
+
* number than its definition names. Versions never change, so a deploy
|
|
46
|
+
* whose definition's version is registered already with other content
|
|
47
|
+
* registers the next free version in its line instead:
|
|
48
|
+
*
|
|
49
|
+
* - `pins-changed`: the definition's version is registered with other
|
|
50
|
+
* pins (a block it uses has a new version);
|
|
51
|
+
* - `unpinned`: the definition's version was published before pins
|
|
52
|
+
* existed, so it has none;
|
|
53
|
+
* - `version-taken`: the definition's version holds another definition;
|
|
54
|
+
* - `edited`: derived from an existing version with some data-block pins
|
|
55
|
+
* swapped (an expert's edit), not from a definition at all.
|
|
56
|
+
*/
|
|
57
|
+
export type VersionDerivationReason = 'pins-changed' | 'unpinned' | 'version-taken' | 'edited';
|
|
58
|
+
|
|
59
|
+
/** The version a version was registered in place of (or derived from), and why. */
|
|
60
|
+
export interface VersionDerivation {
|
|
61
|
+
/** The version the definition names, or the one an edit derived from. */
|
|
62
|
+
readonly version: string;
|
|
63
|
+
readonly reason: VersionDerivationReason;
|
|
64
|
+
/** For an edit: a short label for the version (e.g. "warmer tone"). */
|
|
65
|
+
readonly label?: string;
|
|
66
|
+
/** For an edit: who made it (`user:<id>`, or the token for a key). */
|
|
67
|
+
readonly by?: string;
|
|
68
|
+
}
|