@xemahq/kernel-contracts 0.49.2 → 0.50.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/app-definition/index.d.ts +1 -0
- package/dist/app-definition/index.d.ts.map +1 -1
- package/dist/app-definition/index.js +1 -0
- package/dist/app-definition/index.js.map +1 -1
- package/dist/app-definition/lib/automation.d.ts.map +1 -1
- package/dist/app-definition/lib/automation.js.map +1 -1
- package/dist/app-definition/lib/component.d.ts +8 -0
- package/dist/app-definition/lib/component.d.ts.map +1 -0
- package/dist/app-definition/lib/component.js +8 -0
- package/dist/app-definition/lib/component.js.map +1 -0
- package/dist/app-definition/lib/definition.d.ts +2 -0
- package/dist/app-definition/lib/definition.d.ts.map +1 -1
- package/dist/app-definition/lib/widget.d.ts +2 -0
- package/dist/app-definition/lib/widget.d.ts.map +1 -1
- package/dist/app-definition/lib/widget.js.map +1 -1
- package/dist/capability/lib/capability-contribution.d.ts +2 -0
- package/dist/capability/lib/capability-contribution.d.ts.map +1 -1
- package/dist/capability/lib/capability-contribution.js +2 -0
- package/dist/capability/lib/capability-contribution.js.map +1 -1
- package/dist/space/lib/space.d.ts +2 -0
- package/dist/space/lib/space.d.ts.map +1 -1
- package/dist/space/lib/space.js +12 -1
- package/dist/space/lib/space.js.map +1 -1
- package/package.json +1 -1
- package/src/app-definition/index.ts +1 -0
- package/src/app-definition/lib/automation.ts +3 -2
- package/src/app-definition/lib/component.ts +48 -0
- package/src/app-definition/lib/definition.ts +8 -0
- package/src/app-definition/lib/widget.ts +8 -0
- package/src/capability/lib/capability-contribution.ts +25 -0
- package/src/space/lib/space.ts +38 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/app-definition/index.ts"],"names":[],"mappings":"AAMA,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/app-definition/index.ts"],"names":[],"mappings":"AAMA,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC"}
|
|
@@ -16,6 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./lib/field-type"), exports);
|
|
18
18
|
__exportStar(require("./lib/page-kind"), exports);
|
|
19
|
+
__exportStar(require("./lib/component"), exports);
|
|
19
20
|
__exportStar(require("./lib/widget"), exports);
|
|
20
21
|
__exportStar(require("./lib/action"), exports);
|
|
21
22
|
__exportStar(require("./lib/automation"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/app-definition/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAMA,mDAAiC;AACjC,kDAAgC;AAChC,+CAA6B;AAC7B,+CAA6B;AAC7B,mDAAiC;AACjC,sDAAoC;AACpC,kDAAgC;AAChC,mDAAiC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/app-definition/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAMA,mDAAiC;AACjC,kDAAgC;AAChC,kDAAgC;AAChC,+CAA6B;AAC7B,+CAA6B;AAC7B,mDAAiC;AACjC,sDAAoC;AACpC,kDAAgC;AAChC,mDAAiC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"automation.d.ts","sourceRoot":"","sources":["../../../src/app-definition/lib/automation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"automation.d.ts","sourceRoot":"","sources":["../../../src/app-definition/lib/automation.ts"],"names":[],"mappings":"AAeA,oBAAY,oBAAoB;IAC9B,aAAa,kBAAkB;IAC/B,aAAa,kBAAkB;IAC/B,SAAS,cAAc;CACxB;AAMD,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,oBAAoB,CAAC;IAC9B,SAAS,EAAE,MAAM,CAAC;IAElB,MAAM,EAAE,MAAM,CAAC;IAMf,QAAQ,CAAC,EAAE;QAAE,YAAY,EAAE,MAAM,CAAA;KAAE,CAAC;CACrC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"automation.js","sourceRoot":"","sources":["../../../src/app-definition/lib/automation.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"automation.js","sourceRoot":"","sources":["../../../src/app-definition/lib/automation.ts"],"names":[],"mappings":";;;AAeA,IAAY,oBAIX;AAJD,WAAY,oBAAoB;IAC9B,uDAA+B,CAAA;IAC/B,uDAA+B,CAAA;IAC/B,+CAAuB,CAAA;AACzB,CAAC,EAJW,oBAAoB,oCAApB,oBAAoB,QAI/B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/app-definition/lib/component.ts"],"names":[],"mappings":"AA+BA,oBAAY,gBAAgB;IAE1B,IAAI,SAAS;CACd;AASD,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAC,IAAI,CAAC;IAErC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AppComponentKind = void 0;
|
|
4
|
+
var AppComponentKind;
|
|
5
|
+
(function (AppComponentKind) {
|
|
6
|
+
AppComponentKind["Code"] = "code";
|
|
7
|
+
})(AppComponentKind || (exports.AppComponentKind = AppComponentKind = {}));
|
|
8
|
+
//# sourceMappingURL=component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component.js","sourceRoot":"","sources":["../../../src/app-definition/lib/component.ts"],"names":[],"mappings":";;;AA+BA,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAE1B,iCAAa,CAAA;AACf,CAAC,EAHW,gBAAgB,gCAAhB,gBAAgB,QAG3B"}
|
|
@@ -3,6 +3,7 @@ import { AppPageKind } from './page-kind';
|
|
|
3
3
|
import { AppAction } from './action';
|
|
4
4
|
import { AppAutomation } from './automation';
|
|
5
5
|
import { AppWidget } from './widget';
|
|
6
|
+
import { AppCodeComponent } from './component';
|
|
6
7
|
export interface AppField {
|
|
7
8
|
key: string;
|
|
8
9
|
label: string;
|
|
@@ -36,6 +37,7 @@ export interface AppPage {
|
|
|
36
37
|
widgets?: AppWidget[];
|
|
37
38
|
dateField?: string;
|
|
38
39
|
linkKey?: string;
|
|
40
|
+
component?: AppCodeComponent;
|
|
39
41
|
}
|
|
40
42
|
export interface AppLink {
|
|
41
43
|
key: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definition.d.ts","sourceRoot":"","sources":["../../../src/app-definition/lib/definition.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"definition.d.ts","sourceRoot":"","sources":["../../../src/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AAU,EAAE,CAAC;IAExB,OAAO,CAAC,EAAE,SAAS,EAAE,CAAC;IAEtB,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,OAAO,CAAC,EAAE,MAAM,CAAC;IAOjB,SAAS,CAAC,EAAE,gBAAgB,CAAC;CAC9B;AASD,MAAM,WAAW,OAAO;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAGD,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,SAAS,EAAE,CAAC;IACtB,KAAK,EAAE,OAAO,EAAE,CAAC;IAEjB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,OAAO,CAAC,EAAE,SAAS,EAAE,CAAC;IACtB,WAAW,CAAC,EAAE,aAAa,EAAE,CAAC;IAE9B,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC;CACnB"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AppCodeComponent } from './component';
|
|
1
2
|
export declare enum AppWidgetKind {
|
|
2
3
|
Stat = "stat",
|
|
3
4
|
Table = "table",
|
|
@@ -39,5 +40,6 @@ export interface AppWidget {
|
|
|
39
40
|
aggregate?: AppWidgetAggregate;
|
|
40
41
|
filter?: Record<string, string | number | boolean>;
|
|
41
42
|
series?: AppWidgetSeriesSource;
|
|
43
|
+
component?: AppCodeComponent;
|
|
42
44
|
}
|
|
43
45
|
//# sourceMappingURL=widget.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"widget.d.ts","sourceRoot":"","sources":["../../../src/app-definition/lib/widget.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"widget.d.ts","sourceRoot":"","sources":["../../../src/app-definition/lib/widget.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAG/C,oBAAY,aAAa;IACvB,IAAI,SAAS;IACb,KAAK,UAAU;IAMf,KAAK,UAAU;CAChB;AAQD,oBAAY,mBAAmB;IAC7B,MAAM,WAAW;IACjB,UAAU,eAAe;IACzB,MAAM,WAAW;CAClB;AAGD,oBAAY,kBAAkB;IAC5B,KAAK,UAAU;CAChB;AAOD,oBAAY,YAAY;IACtB,GAAG,QAAQ;IACX,IAAI,SAAS;IACb,KAAK,UAAU;CAChB;AAMD,oBAAY,sBAAsB;IAChC,KAAK,UAAU;IACf,GAAG,QAAQ;CACZ;AAMD,MAAM,MAAM,kBAAkB,GAC1B;IAAE,IAAI,EAAE,sBAAsB,CAAC,KAAK,CAAA;CAAE,GACtC;IAAE,IAAI,EAAE,sBAAsB,CAAC,GAAG,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAOxD,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,MAAM,CAAC;IAElB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,kBAAkB,CAAC;IAC9B,SAAS,EAAE,YAAY,CAAC;CACzB;AAQD,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,aAAa,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IAKd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,kBAAkB,CAAC;IAE/B,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC;IAEnD,MAAM,CAAC,EAAE,qBAAqB,CAAC;IAO/B,SAAS,CAAC,EAAE,gBAAgB,CAAC;CAC9B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"widget.js","sourceRoot":"","sources":["../../../src/app-definition/lib/widget.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"widget.js","sourceRoot":"","sources":["../../../src/app-definition/lib/widget.ts"],"names":[],"mappings":";;;AASA,IAAY,aASX;AATD,WAAY,aAAa;IACvB,8BAAa,CAAA;IACb,gCAAe,CAAA;IAMf,gCAAe,CAAA;AACjB,CAAC,EATW,aAAa,6BAAb,aAAa,QASxB;AAQD,IAAY,mBAIX;AAJD,WAAY,mBAAmB;IAC7B,wCAAiB,CAAA;IACjB,gDAAyB,CAAA;IACzB,wCAAiB,CAAA;AACnB,CAAC,EAJW,mBAAmB,mCAAnB,mBAAmB,QAI9B;AAGD,IAAY,kBAEX;AAFD,WAAY,kBAAkB;IAC5B,qCAAe,CAAA;AACjB,CAAC,EAFW,kBAAkB,kCAAlB,kBAAkB,QAE7B;AAOD,IAAY,YAIX;AAJD,WAAY,YAAY;IACtB,2BAAW,CAAA;IACX,6BAAa,CAAA;IACb,+BAAe,CAAA;AACjB,CAAC,EAJW,YAAY,4BAAZ,YAAY,QAIvB;AAMD,IAAY,sBAGX;AAHD,WAAY,sBAAsB;IAChC,yCAAe,CAAA;IACf,qCAAW,CAAA;AACb,CAAC,EAHW,sBAAsB,sCAAtB,sBAAsB,QAGjC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { type CapabilityRef } from './capability-ref';
|
|
3
3
|
import { type CapabilityRiskTier } from './permission-profile';
|
|
4
|
+
import { type DataClassification } from '../../space';
|
|
4
5
|
export interface CapabilityContributionManifest {
|
|
5
6
|
readonly ref: CapabilityRef;
|
|
6
7
|
readonly title: string;
|
|
@@ -13,6 +14,7 @@ export interface CapabilityContributionManifest {
|
|
|
13
14
|
readonly examples?: readonly Record<string, unknown>[];
|
|
14
15
|
readonly externalServiceRef?: string;
|
|
15
16
|
readonly defaultCredentialBindingRef?: string;
|
|
17
|
+
readonly outputClassification?: DataClassification;
|
|
16
18
|
}
|
|
17
19
|
export declare const CapabilityContributionManifestSchema: z.ZodType<CapabilityContributionManifest>;
|
|
18
20
|
//# sourceMappingURL=capability-contribution.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capability-contribution.d.ts","sourceRoot":"","sources":["../../../src/capability/lib/capability-contribution.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAuB,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAC3E,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"capability-contribution.d.ts","sourceRoot":"","sources":["../../../src/capability/lib/capability-contribution.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAuB,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAC3E,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,aAAa,CAAC;AAsBrB,MAAM,WAAW,8BAA8B;IAE7C,QAAQ,CAAC,GAAG,EAAE,aAAa,CAAC;IAE5B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAEvB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAEzB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAE7B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAE9C,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAE/C,QAAQ,CAAC,QAAQ,EAAE,kBAAkB,CAAC;IAKtC,QAAQ,CAAC,gBAAgB,EAAE,OAAO,CAAC;IAKnC,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;IAUvD,QAAQ,CAAC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAOrC,QAAQ,CAAC,2BAA2B,CAAC,EAAE,MAAM,CAAC;IAoB9C,QAAQ,CAAC,oBAAoB,CAAC,EAAE,kBAAkB,CAAC;CACpD;AAcD,eAAO,MAAM,oCAAoC,EAAE,CAAC,CAAC,OAAO,CAAC,8BAA8B,CAiB1C,CAAC"}
|
|
@@ -4,6 +4,7 @@ exports.CapabilityContributionManifestSchema = void 0;
|
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const capability_ref_1 = require("./capability-ref");
|
|
6
6
|
const permission_profile_1 = require("./permission-profile");
|
|
7
|
+
const space_1 = require("../../space");
|
|
7
8
|
exports.CapabilityContributionManifestSchema = zod_1.z.object({
|
|
8
9
|
ref: capability_ref_1.CapabilityRefSchema,
|
|
9
10
|
title: zod_1.z.string().min(1).max(200),
|
|
@@ -19,5 +20,6 @@ exports.CapabilityContributionManifestSchema = zod_1.z.object({
|
|
|
19
20
|
.optional(),
|
|
20
21
|
externalServiceRef: zod_1.z.string().min(1).max(200).optional(),
|
|
21
22
|
defaultCredentialBindingRef: zod_1.z.string().min(1).max(200).optional(),
|
|
23
|
+
outputClassification: space_1.DataClassificationSchema.optional(),
|
|
22
24
|
});
|
|
23
25
|
//# sourceMappingURL=capability-contribution.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capability-contribution.js","sourceRoot":"","sources":["../../../src/capability/lib/capability-contribution.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,qDAA2E;AAC3E,6DAG8B;
|
|
1
|
+
{"version":3,"file":"capability-contribution.js","sourceRoot":"","sources":["../../../src/capability/lib/capability-contribution.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,qDAA2E;AAC3E,6DAG8B;AAC9B,uCAGqB;AAkGR,QAAA,oCAAoC,GAC/C,OAAC,CAAC,MAAM,CAAC;IACP,GAAG,EAAE,oCAAmB;IACxB,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;IACjC,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC;IACpC,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC;IACxC,WAAW,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC;IAC9C,YAAY,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC;IAC/C,QAAQ,EAAE,6CAAwB;IAClC,gBAAgB,EAAE,OAAC,CAAC,OAAO,EAAE;IAC7B,QAAQ,EAAE,OAAC;SACR,KAAK,CAAC,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,CAAC;SACxC,GAAG,CAAC,EAAE,CAAC;SACP,QAAQ,EAAE;IACb,kBAAkB,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;IACzD,2BAA2B,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;IAClE,oBAAoB,EAAE,gCAAwB,CAAC,QAAQ,EAAE;CAC1D,CAA8C,CAAC"}
|
|
@@ -28,6 +28,8 @@ export interface SpaceRef {
|
|
|
28
28
|
}
|
|
29
29
|
export declare const SpaceKindSchema: z.ZodEnum<typeof SpaceKind>;
|
|
30
30
|
export declare const DataClassificationSchema: z.ZodEnum<typeof DataClassification>;
|
|
31
|
+
export declare const DATA_CLASSIFICATION_RANK: Readonly<Record<DataClassification, number>>;
|
|
32
|
+
export declare function dataClassificationExceeds(candidate: DataClassification, cap: DataClassification): boolean;
|
|
31
33
|
export declare const SpaceRefSchema: z.ZodObject<{
|
|
32
34
|
tier: z.ZodEnum<typeof SpaceKind>;
|
|
33
35
|
orgId: z.ZodOptional<z.ZodString>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"space.d.ts","sourceRoot":"","sources":["../../../src/space/lib/space.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAWxB,oBAAY,SAAS;IACnB,MAAM,WAAW;IACjB,GAAG,QAAQ;IACX,OAAO,YAAY;IACnB,GAAG,QAAQ;IACX,OAAO,YAAY;IACnB,KAAK,UAAU;IACf,IAAI,SAAS;CACd;AAGD,oBAAY,kBAAkB;IAC5B,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,YAAY,iBAAiB;IAC7B,MAAM,WAAW;IACjB,SAAS,cAAc;CACxB;AAeD,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,SAAS,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE,kBAAkB,CAAC;CACrC;AAED,eAAO,MAAM,eAAe,6BAA0B,CAAC;AACvD,eAAO,MAAM,wBAAwB,sCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"space.d.ts","sourceRoot":"","sources":["../../../src/space/lib/space.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAWxB,oBAAY,SAAS;IACnB,MAAM,WAAW;IACjB,GAAG,QAAQ;IACX,OAAO,YAAY;IACnB,GAAG,QAAQ;IACX,OAAO,YAAY;IACnB,KAAK,UAAU;IACf,IAAI,SAAS;CACd;AAGD,oBAAY,kBA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
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SpaceRefSchema = exports.DataClassificationSchema = exports.SpaceKindSchema = exports.DataClassification = exports.SpaceKind = void 0;
|
|
3
|
+
exports.SpaceRefSchema = exports.DATA_CLASSIFICATION_RANK = exports.DataClassificationSchema = exports.SpaceKindSchema = exports.DataClassification = exports.SpaceKind = void 0;
|
|
4
|
+
exports.dataClassificationExceeds = dataClassificationExceeds;
|
|
4
5
|
exports.spaceRefToPath = spaceRefToPath;
|
|
5
6
|
const zod_1 = require("zod");
|
|
6
7
|
var SpaceKind;
|
|
@@ -23,6 +24,16 @@ var DataClassification;
|
|
|
23
24
|
})(DataClassification || (exports.DataClassification = DataClassification = {}));
|
|
24
25
|
exports.SpaceKindSchema = zod_1.z.nativeEnum(SpaceKind);
|
|
25
26
|
exports.DataClassificationSchema = zod_1.z.nativeEnum(DataClassification);
|
|
27
|
+
exports.DATA_CLASSIFICATION_RANK = {
|
|
28
|
+
[DataClassification.Public]: 0,
|
|
29
|
+
[DataClassification.Internal]: 1,
|
|
30
|
+
[DataClassification.Confidential]: 2,
|
|
31
|
+
[DataClassification.Secret]: 3,
|
|
32
|
+
[DataClassification.Regulated]: 4,
|
|
33
|
+
};
|
|
34
|
+
function dataClassificationExceeds(candidate, cap) {
|
|
35
|
+
return exports.DATA_CLASSIFICATION_RANK[candidate] > exports.DATA_CLASSIFICATION_RANK[cap];
|
|
36
|
+
}
|
|
26
37
|
const spaceRefBaseShape = {
|
|
27
38
|
tier: exports.SpaceKindSchema,
|
|
28
39
|
orgId: zod_1.z.string().min(1).optional(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"space.js","sourceRoot":"","sources":["../../../src/space/lib/space.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"space.js","sourceRoot":"","sources":["../../../src/space/lib/space.ts"],"names":[],"mappings":";;;AAyFA,8DAKC;AA4DD,wCAuCC;AAjMD,6BA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,KAAK,EAAE,CAAC;gBAC/C,MAAM,IAAI,KAAK,CACb,oEAAoE,CACrE,CAAC;YACJ,CAAC;YACD,OAAO,SAAS,GAAG,CAAC,KAAK,aAAa,GAAG,CAAC,SAAS,SAAS,GAAG,CAAC,KAAK,EAAE,CAAC;QAC1E,KAAK,SAAS,CAAC,OAAO;YACpB,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,CAAC;gBACnB,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC,CAAC;YAC1E,CAAC;YACD,OAAO,aAAa,GAAG,CAAC,SAAS,EAAE,CAAC;QACtC,KAAK,SAAS,CAAC,IAAI;YACjB,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC;gBAChB,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAC;YACpE,CAAC;YACD,OAAO,UAAU,GAAG,CAAC,MAAM,EAAE,CAAC;IAClC,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xemahq/kernel-contracts",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.50.0",
|
|
4
4
|
"description": "Consolidated Xema OS kernel wire contracts — pure types + zod schemas for the kernel protocol surfaces. One package, one npm scope, wildcard per-surface subpath exports. No framework/runtime deps.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Neuralchowder Inc. <developer@xema.dev> (https://xema.dev)",
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
// the richer zod-inferred `*Def` types stay in the app-forge server.
|
|
7
7
|
export * from './lib/field-type';
|
|
8
8
|
export * from './lib/page-kind';
|
|
9
|
+
export * from './lib/component';
|
|
9
10
|
export * from './lib/widget';
|
|
10
11
|
export * from './lib/action';
|
|
11
12
|
export * from './lib/automation';
|
|
@@ -9,8 +9,9 @@
|
|
|
9
9
|
*
|
|
10
10
|
* - `recordCreated` / `recordUpdated` fire transactionally-adjacent to a record
|
|
11
11
|
* write, against the written record.
|
|
12
|
-
* - `scheduled` fires on a cluster-singleton
|
|
13
|
-
* action against every record of the bound entity on
|
|
12
|
+
* - `scheduled` fires on a cluster-singleton schedule owned by the workflow
|
|
13
|
+
* runtime, and runs its action against every record of the bound entity on
|
|
14
|
+
* each tick.
|
|
14
15
|
*/
|
|
15
16
|
export enum AppAutomationTrigger {
|
|
16
17
|
RecordCreated = 'recordCreated',
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Custom-UI code component — the ADDITIVE Wave-12 extension to the App Forge
|
|
3
|
+
* declarative definition (plan `runtime-app-platform.md` Wave 12 / D19). A page
|
|
4
|
+
* or widget MAY carry a `component: { kind: 'code', source }` to render an
|
|
5
|
+
* author-written UI component INSTEAD of the generic declarative renderer.
|
|
6
|
+
*
|
|
7
|
+
* This surface is the SHAPE contract only — the closed `AppComponentKind` enum
|
|
8
|
+
* plus the plain {@link AppCodeComponent} interface shared, byte-identically,
|
|
9
|
+
* by the app-forge server (whose zod schema validates it) and the App Forge web
|
|
10
|
+
* renderer (which draws it). The COMPILE step (server-side esbuild against a
|
|
11
|
+
* pinned `@xemahq/app-ui`, the SRI'd ESM chunk, and the opaque-origin iframe
|
|
12
|
+
* runtime) is NOT part of this contract — it is the large multi-wave runtime the
|
|
13
|
+
* plan defers. Declaring a code component is additive: an absent `component`
|
|
14
|
+
* (the default on every page/widget today) preserves the current declarative
|
|
15
|
+
* behavior exactly.
|
|
16
|
+
*
|
|
17
|
+
* **Cost is not free and the platform must say so.** The moment a definition
|
|
18
|
+
* carries a code component, publishing it means COMPILING it, and the app stops
|
|
19
|
+
* being live-on-keystroke (plan Wave 12). Until the compiler + iframe runtime
|
|
20
|
+
* ship, the app-forge publish path FAILS CLOSED on any definition containing a
|
|
21
|
+
* code component (`APP_CUSTOM_UI_NOT_YET_AVAILABLE`) — it never silently accepts
|
|
22
|
+
* or ignores one.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Closed set of custom-UI component kinds. Only `code` exists — a
|
|
27
|
+
* server-compiled, author-authored component. A future non-code kind (e.g. a
|
|
28
|
+
* pinned marketplace component) is a one-line addition here plus a matching
|
|
29
|
+
* discriminated variant. Stable wire string; never compare against a free-form
|
|
30
|
+
* string.
|
|
31
|
+
*/
|
|
32
|
+
export enum AppComponentKind {
|
|
33
|
+
/** An author-written UI component, compiled server-side against `@xemahq/app-ui`. */
|
|
34
|
+
Code = 'code',
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* A `kind: 'code'` custom-UI component authored against the pinned
|
|
39
|
+
* `@xemahq/app-ui` surface. `source` is the raw component module text; it is
|
|
40
|
+
* validated (length-bounded) and — once the compiler ships — type-checked and
|
|
41
|
+
* responsive-linted at PUBLISH time, never at author-keystroke time. Carried
|
|
42
|
+
* inside the opaque app-definition JSON on a page or widget.
|
|
43
|
+
*/
|
|
44
|
+
export interface AppCodeComponent {
|
|
45
|
+
readonly kind: AppComponentKind.Code;
|
|
46
|
+
/** The raw component module source authored against `@xemahq/app-ui`. */
|
|
47
|
+
readonly source: string;
|
|
48
|
+
}
|
|
@@ -14,6 +14,7 @@ import { AppPageKind } from './page-kind';
|
|
|
14
14
|
import { AppAction } from './action';
|
|
15
15
|
import { AppAutomation } from './automation';
|
|
16
16
|
import { AppWidget } from './widget';
|
|
17
|
+
import { AppCodeComponent } from './component';
|
|
17
18
|
|
|
18
19
|
/**
|
|
19
20
|
* One entity field. `object`/`list` fields carry a recursive nested `fields[]`
|
|
@@ -76,6 +77,13 @@ export interface AppPage {
|
|
|
76
77
|
dateField?: string;
|
|
77
78
|
/** related: key of the {@link AppLink} this page reverse-looks-up. */
|
|
78
79
|
linkKey?: string;
|
|
80
|
+
/**
|
|
81
|
+
* Custom-UI (Wave 12): an author-written code component that renders this page
|
|
82
|
+
* INSTEAD of the generic declarative renderer. Additive — absent ⇒ the page
|
|
83
|
+
* renders declaratively (today's behavior). A definition carrying any code
|
|
84
|
+
* component is compile-gated at publish (see {@link AppCodeComponent}).
|
|
85
|
+
*/
|
|
86
|
+
component?: AppCodeComponent;
|
|
79
87
|
}
|
|
80
88
|
|
|
81
89
|
/**
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* app-forge server's zod schema and the web renderer. All values are stable
|
|
5
5
|
* wire strings — never compare against a free-form string.
|
|
6
6
|
*/
|
|
7
|
+
import { AppCodeComponent } from './component';
|
|
7
8
|
|
|
8
9
|
/** Closed set of dashboard widget kinds. */
|
|
9
10
|
export enum AppWidgetKind {
|
|
@@ -94,4 +95,11 @@ export interface AppWidget {
|
|
|
94
95
|
filter?: Record<string, string | number | boolean>;
|
|
95
96
|
/** Series (chart) source — present iff `kind === AppWidgetKind.Chart`. */
|
|
96
97
|
series?: AppWidgetSeriesSource;
|
|
98
|
+
/**
|
|
99
|
+
* Custom-UI (Wave 12): an author-written code component that renders this
|
|
100
|
+
* widget INSTEAD of the generic declarative widget renderer. Additive — absent
|
|
101
|
+
* ⇒ the widget renders declaratively (today's behavior). Compile-gated at
|
|
102
|
+
* publish (see {@link AppCodeComponent}).
|
|
103
|
+
*/
|
|
104
|
+
component?: AppCodeComponent;
|
|
97
105
|
}
|
|
@@ -5,6 +5,10 @@ import {
|
|
|
5
5
|
CapabilityRiskTierSchema,
|
|
6
6
|
type CapabilityRiskTier,
|
|
7
7
|
} from './permission-profile';
|
|
8
|
+
import {
|
|
9
|
+
DataClassificationSchema,
|
|
10
|
+
type DataClassification,
|
|
11
|
+
} from '../../space';
|
|
8
12
|
|
|
9
13
|
/**
|
|
10
14
|
* Manifest shape carried by every `ContributionKind.Capability` envelope.
|
|
@@ -68,6 +72,26 @@ export interface CapabilityContributionManifest {
|
|
|
68
72
|
* broker), NEVER a secret. Only meaningful alongside `externalServiceRef`.
|
|
69
73
|
*/
|
|
70
74
|
readonly defaultCredentialBindingRef?: string;
|
|
75
|
+
/**
|
|
76
|
+
* OPTIONAL declared classification of the data this capability RETURNS.
|
|
77
|
+
*
|
|
78
|
+
* It is the static value the capability-router's
|
|
79
|
+
* `restrict-output-classification` policy obligation compares against: if a
|
|
80
|
+
* capability DECLARES an output classification that is strictly more
|
|
81
|
+
* restrictive than the invocation context's cap, the invocation is REFUSED —
|
|
82
|
+
* a comparison of two declared values, with no need to inspect response
|
|
83
|
+
* bytes.
|
|
84
|
+
*
|
|
85
|
+
* Optional BY DESIGN — this is the load-bearing safety rule, not a silent
|
|
86
|
+
* default. An UNDECLARED classification means the capability makes NO claim to
|
|
87
|
+
* return restricted data, so it "does not exceed" any cap and PASSES every
|
|
88
|
+
* clamp. Only a capability that EXPLICITLY declares a classification above the
|
|
89
|
+
* cap fails closed. This keeps re-enabling the obligation additive: a
|
|
90
|
+
* capability that declares nothing (every capability today) is never newly
|
|
91
|
+
* refused. Do NOT change the absent case to fail closed — that would reproduce
|
|
92
|
+
* the mass-denial that removing the obligation fixed.
|
|
93
|
+
*/
|
|
94
|
+
readonly outputClassification?: DataClassification;
|
|
71
95
|
}
|
|
72
96
|
|
|
73
97
|
/**
|
|
@@ -98,4 +122,5 @@ export const CapabilityContributionManifestSchema: z.ZodType<CapabilityContribut
|
|
|
98
122
|
.optional(),
|
|
99
123
|
externalServiceRef: z.string().min(1).max(200).optional(),
|
|
100
124
|
defaultCredentialBindingRef: z.string().min(1).max(200).optional(),
|
|
125
|
+
outputClassification: DataClassificationSchema.optional(),
|
|
101
126
|
}) as z.ZodType<CapabilityContributionManifest>;
|
package/src/space/lib/space.ts
CHANGED
|
@@ -56,6 +56,44 @@ export interface SpaceRef {
|
|
|
56
56
|
export const SpaceKindSchema = z.nativeEnum(SpaceKind);
|
|
57
57
|
export const DataClassificationSchema = z.nativeEnum(DataClassification);
|
|
58
58
|
|
|
59
|
+
/**
|
|
60
|
+
* Total order over {@link DataClassification} — least → most restrictive.
|
|
61
|
+
*
|
|
62
|
+
* Public(0) < Internal(1) < Confidential(2) < Secret(3) < Regulated(4)
|
|
63
|
+
*
|
|
64
|
+
* This is the SINGLE authoritative ordering of the closed set (consumed by the
|
|
65
|
+
* capability-router's `restrict-output-classification` obligation clamp, and by
|
|
66
|
+
* any future declared-vs-cap comparison). Every enum member has a rank so the
|
|
67
|
+
* comparison is total and deterministic — never an ad-hoc string compare.
|
|
68
|
+
*
|
|
69
|
+
* `Regulated` ranks HIGHEST (most restrictive) on purpose: data under a
|
|
70
|
+
* regulatory regime is at least as sensitive as `Secret`, and putting it at the
|
|
71
|
+
* top makes the cap comparison fail CLOSED — a capability declaring `regulated`
|
|
72
|
+
* output is refused unless the cap is also `regulated`, never accidentally
|
|
73
|
+
* treated as below `secret`.
|
|
74
|
+
*/
|
|
75
|
+
export const DATA_CLASSIFICATION_RANK: Readonly<
|
|
76
|
+
Record<DataClassification, number>
|
|
77
|
+
> = {
|
|
78
|
+
[DataClassification.Public]: 0,
|
|
79
|
+
[DataClassification.Internal]: 1,
|
|
80
|
+
[DataClassification.Confidential]: 2,
|
|
81
|
+
[DataClassification.Secret]: 3,
|
|
82
|
+
[DataClassification.Regulated]: 4,
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* `true` iff `candidate` is STRICTLY more restrictive than `cap` in the
|
|
87
|
+
* {@link DATA_CLASSIFICATION_RANK} order — i.e. `candidate` "exceeds the cap".
|
|
88
|
+
* Equal or lower ranks return `false` (the cap is satisfied).
|
|
89
|
+
*/
|
|
90
|
+
export function dataClassificationExceeds(
|
|
91
|
+
candidate: DataClassification,
|
|
92
|
+
cap: DataClassification,
|
|
93
|
+
): boolean {
|
|
94
|
+
return DATA_CLASSIFICATION_RANK[candidate] > DATA_CLASSIFICATION_RANK[cap];
|
|
95
|
+
}
|
|
96
|
+
|
|
59
97
|
type SegmentKey =
|
|
60
98
|
| 'orgId'
|
|
61
99
|
| 'projectId'
|