@milaboratories/pl-model-middle-layer 1.36.0 → 1.37.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/index.d.ts +2 -2
- package/dist/instance_stats.cjs +1 -1
- package/dist/instance_stats.cjs.map +1 -1
- package/dist/instance_stats.d.ts +4 -4
- package/dist/instance_stats.d.ts.map +1 -1
- package/dist/instance_stats.js +1 -1
- package/dist/instance_stats.js.map +1 -1
- package/package.json +1 -1
- package/src/instance_stats.ts +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { AuthorMarker } from "./author_marker.js";
|
|
|
2
2
|
import { BlockSettings, InitialBlockSettings, VersionLock } from "./block_settings.js";
|
|
3
3
|
import { StorageDebugView } from "./storage_debug_view.js";
|
|
4
4
|
import { BlockStateInternal, BlockStateInternalV3 } from "./block_state.js";
|
|
5
|
-
import { InstanceStats,
|
|
5
|
+
import { InstanceStats, InstanceStatsCapacity, InstanceStatsStatus, UnsupportedInstanceStats } from "./instance_stats.js";
|
|
6
6
|
import { ProjectMeta, normalizeDescription, normalizeProjectMeta } from "./project.js";
|
|
7
7
|
import { ProjectListEntry } from "./project_list.js";
|
|
8
8
|
import { BlockPackDevV1, BlockPackDevV2, BlockPackFromPackV2, BlockPackFromRegistryV1, BlockPackFromRegistryV2, BlockPackSpec } from "./block_registry/block_pack_spec.js";
|
|
@@ -34,4 +34,4 @@ import "./block_meta/index.js";
|
|
|
34
34
|
import { index_d_exports } from "./pframe/internal_api/index.js";
|
|
35
35
|
import "./pframe/index.js";
|
|
36
36
|
import { HashedJson, hashJson, readJson, readJsonSync } from "./json.js";
|
|
37
|
-
export { AnyChannel, type AuthorMarker, BlockCalculationStatus, BlockComponents, BlockComponentsDescriptionRaw, BlockComponentsManifest, BlockKindRef, BlockPackDescription, BlockPackDescriptionFromPackageJsonRaw, BlockPackDescriptionManifest, BlockPackDescriptionRaw, BlockPackDevV1, BlockPackDevV2, BlockPackFromPackV2, BlockPackFromRegistryV1, BlockPackFromRegistryV2, BlockPackId, BlockPackIdNoVersion, BlockPackListing, BlockPackManifest, BlockPackManifestFile, BlockPackMeta, BlockPackMetaDescriptionRaw, BlockPackMetaEmbeddedBase64, BlockPackMetaEmbeddedBytes, BlockPackMetaManifest, BlockPackOverview, BlockPackOverviewLegacy, BlockPackOverviewNoRegistryId, BlockPackOverviewRaw, BlockPackSpec, BlockPlatform, BlockSettings, BlockStateInternal, BlockStateInternalV3, BlockStateOverview, Content, ContentAbsoluteBinaryLocal, ContentAbsoluteFile, ContentAbsoluteFolder, ContentAbsoluteTextLocal, ContentAbsoluteUrl, ContentAnyBinaryLocal, ContentAnyLocal, ContentAnyTextLocal, ContentExplicitBase64, ContentExplicitBytes, ContentExplicitOrRelative, ContentExplicitString, ContentRelative, ContentRelativeBinary, ContentRelativeText, ContentType, ContextType, CreateBlockPackDescriptionSchema, DescriptionContentBinary, DescriptionContentText, FOLDERS_SCHEMA_VERSION, FeatureFlags, FolderEntry, FolderId, FolderView, FoldersDecoded, FoldersDocument, FoldersDocumentProblem, FoldersEdit, FoldersItem, FoldersItemInput, FoldersItemView, FoldersLabelRename, FoldersLeafItem, FoldersMoveApplication, FoldersMoveEntry, FoldersMoveIssue, FoldersMoveOutcome, FoldersMovePlan, FoldersMovePlanResult, FoldersPlacement, FoldersProjectInput, FoldersProjectView, FoldersRemoval, FoldersRemovalIssue, FoldersRemovalOutcome, FoldersRemovalPlanResult, FoldersStoredDocument, FoldersTemplateInput, FoldersTemplateView, FoldersView, FoldersViolation, HashedJson, InitialBlockSettings, InstanceStats,
|
|
37
|
+
export { AnyChannel, type AuthorMarker, BlockCalculationStatus, BlockComponents, BlockComponentsDescriptionRaw, BlockComponentsManifest, BlockKindRef, BlockPackDescription, BlockPackDescriptionFromPackageJsonRaw, BlockPackDescriptionManifest, BlockPackDescriptionRaw, BlockPackDevV1, BlockPackDevV2, BlockPackFromPackV2, BlockPackFromRegistryV1, BlockPackFromRegistryV2, BlockPackId, BlockPackIdNoVersion, BlockPackListing, BlockPackManifest, BlockPackManifestFile, BlockPackMeta, BlockPackMetaDescriptionRaw, BlockPackMetaEmbeddedBase64, BlockPackMetaEmbeddedBytes, BlockPackMetaManifest, BlockPackOverview, BlockPackOverviewLegacy, BlockPackOverviewNoRegistryId, BlockPackOverviewRaw, BlockPackSpec, BlockPlatform, BlockSettings, BlockStateInternal, BlockStateInternalV3, BlockStateOverview, Content, ContentAbsoluteBinaryLocal, ContentAbsoluteFile, ContentAbsoluteFolder, ContentAbsoluteTextLocal, ContentAbsoluteUrl, ContentAnyBinaryLocal, ContentAnyLocal, ContentAnyTextLocal, ContentExplicitBase64, ContentExplicitBytes, ContentExplicitOrRelative, ContentExplicitString, ContentRelative, ContentRelativeBinary, ContentRelativeText, ContentType, ContextType, CreateBlockPackDescriptionSchema, DescriptionContentBinary, DescriptionContentText, FOLDERS_SCHEMA_VERSION, FeatureFlags, FolderEntry, FolderId, FolderView, FoldersDecoded, FoldersDocument, FoldersDocumentProblem, FoldersEdit, FoldersItem, FoldersItemInput, FoldersItemView, FoldersLabelRename, FoldersLeafItem, FoldersMoveApplication, FoldersMoveEntry, FoldersMoveIssue, FoldersMoveOutcome, FoldersMovePlan, FoldersMovePlanResult, FoldersPlacement, FoldersProjectInput, FoldersProjectView, FoldersRemoval, FoldersRemovalIssue, FoldersRemovalOutcome, FoldersRemovalPlanResult, FoldersStoredDocument, FoldersTemplateInput, FoldersTemplateView, FoldersView, FoldersViolation, HashedJson, InitialBlockSettings, InstanceStats, InstanceStatsCapacity, InstanceStatsStatus, LocalDevFolder, ManifestFileInfo, index_d_exports as PFrameInternal, ProjectListEntry, ProjectMeta, ProjectOverview, RegistryEntry, RegistryList, RegistrySpec, RegistryStatus, RemoteRegistryV1Spec, RemoteRegistryV2Spec, SemVer, Sha256Schema, SingleBlockPackOverview, StableChannel, StorageDebugView, UnsupportedInstanceStats, UpdateSuggestion, UpdateSuggestions, VersionLock, VersionWithChannels, Workflow, WorkflowSchemaV1, WorkflowV1, addPrefixToRelative, applyFoldersMove, applyFoldersRemoval, asFolderId, blockPackIdEquals, blockPackIdNoVersionEquals, blockPackIdNoVersionToString, blockPackIdToString, blockPackOverviewToLegacy, commitFoldersMove, commitFoldersRemoval, decodeFoldersDocument, decodeStoredFoldersDocument, emptyFoldersDocument, encodeFoldersDocument, foldersChildren, foldersDocumentFromView, foldersMovePlansEqual, foldersNameBlank, foldersNameTaken, foldersRemovalsEqual, foldersSiblingNames, foldersSubtree, foldersUniqueName, foldersViewFromDocument, formatFoldersViolation, hashJson, healFolders, inheritedFolder, mapRemoteToAbsolute, normalizeDescription, normalizeProjectMeta, overrideDescriptionVersion, overrideManifestVersion, planFoldersMove, planFoldersRemoval, readJson, readJsonSync, validateFoldersDocument };
|
package/dist/instance_stats.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// src/instance_stats.ts
|
|
2
2
|
/** Stats for a backend without the instance statistics context. */
|
|
3
|
-
const UnsupportedInstanceStats = {
|
|
3
|
+
const UnsupportedInstanceStats = { status: "unsupported" };
|
|
4
4
|
exports.UnsupportedInstanceStats = UnsupportedInstanceStats;
|
|
5
5
|
|
|
6
6
|
//# sourceMappingURL=instance_stats.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instance_stats.cjs","names":[],"sources":["../src/instance_stats.ts"],"sourcesContent":["/**\n * The load of the whole Platforma instance, as the Desktop App shows it in its top bar.\n *\n * The backend keeps one instance statistics context per instance, and its executor runner writes\n * the scheduler's readings into it every few seconds. The middle layer reads them; the numbers are\n * what the scheduler has allocated, not measured use.\n */\n\n/** CPU or RAM: what is allocated now, out of the configured capacity when the backend knows it. */\nexport type InstanceStatsCapacity = {\n /** Configured capacity, undefined when the source does not know it. */\n readonly total?: number;\n /** Allocated now. Can exceed `total`: local CPU can be overcommitted. */\n readonly current: number;\n};\n\n/**
|
|
1
|
+
{"version":3,"file":"instance_stats.cjs","names":[],"sources":["../src/instance_stats.ts"],"sourcesContent":["/**\n * The load of the whole Platforma instance, as the Desktop App shows it in its top bar.\n *\n * The backend keeps one instance statistics context per instance, and its executor runner writes\n * the scheduler's readings into it every few seconds. The middle layer reads them; the numbers are\n * what the scheduler has allocated, not measured use.\n */\n\n/** CPU or RAM: what is allocated now, out of the configured capacity when the backend knows it. */\nexport type InstanceStatsCapacity = {\n /** Configured capacity, undefined when the source does not know it. */\n readonly total?: number;\n /** Allocated now. Can exceed `total`: local CPU can be overcommitted. */\n readonly current: number;\n};\n\n/** Whether the stats were read, and why they carry no numbers when not. */\nexport type InstanceStatsStatus =\n /** Read from the instance statistics context. */\n | \"ok\"\n /** The backend has no instance statistics context. */\n | \"unsupported\"\n /** The context exists but could not be read. */\n | \"unreadable\";\n\n/** One sample of the instance statistics. */\nexport type InstanceStats = {\n readonly status: InstanceStatsStatus;\n /** In millicores. */\n readonly cpu?: InstanceStatsCapacity;\n /** In bytes. */\n readonly ram?: InstanceStatsCapacity;\n /**\n * GPUs. On Kueue, devices held by jobs out of the quota. Locally, jobs that use a GPU on the\n * detected cards; jobs share cards, so `current` can exceed `total`. Undefined when no GPU count\n * is known: a local install without a GPU, or Kubernetes without a GPU pool.\n */\n readonly gpu?: InstanceStatsCapacity;\n /** GPU memory allocated to jobs, in bytes. Set only on a local install with a detected GPU. */\n readonly gpuMemory?: InstanceStatsCapacity;\n /** Jobs holding an allocation, and jobs waiting for one. */\n readonly jobs?: { readonly running: number; readonly queued: number };\n /** Where the numbers come from, `scheduler` or `kueue`. A label only. */\n readonly source?: string;\n};\n\n/** Stats for a backend without the instance statistics context. */\nexport const UnsupportedInstanceStats: InstanceStats = { status: \"unsupported\" };\n"],"mappings":";;AA+CA,MAAa,2BAA0C,EAAE,QAAQ,cAAc"}
|
package/dist/instance_stats.d.ts
CHANGED
|
@@ -12,17 +12,17 @@ export type InstanceStatsCapacity = {
|
|
|
12
12
|
/** Allocated now. Can exceed `total`: local CPU can be overcommitted. */
|
|
13
13
|
readonly current: number;
|
|
14
14
|
};
|
|
15
|
-
/**
|
|
16
|
-
export type
|
|
15
|
+
/** Whether the stats were read, and why they carry no numbers when not. */
|
|
16
|
+
export type InstanceStatsStatus =
|
|
17
17
|
/** Read from the instance statistics context. */
|
|
18
|
-
"
|
|
18
|
+
"ok" |
|
|
19
19
|
/** The backend has no instance statistics context. */
|
|
20
20
|
"unsupported" |
|
|
21
21
|
/** The context exists but could not be read. */
|
|
22
22
|
"unreadable";
|
|
23
23
|
/** One sample of the instance statistics. */
|
|
24
24
|
export type InstanceStats = {
|
|
25
|
-
readonly
|
|
25
|
+
readonly status: InstanceStatsStatus;
|
|
26
26
|
/** In millicores. */
|
|
27
27
|
readonly cpu?: InstanceStatsCapacity;
|
|
28
28
|
/** In bytes. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instance_stats.d.ts","names":[],"sources":["../src/instance_stats.ts"],"mappings":";;;;;;;;YASY;;WAED;;WAEA;;;YAIC;;;;;;;;YASA;WACD,
|
|
1
|
+
{"version":3,"file":"instance_stats.d.ts","names":[],"sources":["../src/instance_stats.ts"],"mappings":";;;;;;;;YASY;;WAED;;WAEA;;;YAIC;;;;;;;;YASA;WACD,QAAQ;;WAER,MAAM;;WAEN,MAAM;;;;;;WAMN,MAAM;;WAEN,YAAY;;WAEZ;aAAkB;aAA0B;;;WAE5C;;;qBAIE,0BAA0B"}
|
package/dist/instance_stats.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// src/instance_stats.ts
|
|
2
2
|
/** Stats for a backend without the instance statistics context. */
|
|
3
|
-
const UnsupportedInstanceStats = {
|
|
3
|
+
const UnsupportedInstanceStats = { status: "unsupported" };
|
|
4
4
|
export { UnsupportedInstanceStats };
|
|
5
5
|
|
|
6
6
|
//# sourceMappingURL=instance_stats.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instance_stats.js","names":[],"sources":["../src/instance_stats.ts"],"sourcesContent":["/**\n * The load of the whole Platforma instance, as the Desktop App shows it in its top bar.\n *\n * The backend keeps one instance statistics context per instance, and its executor runner writes\n * the scheduler's readings into it every few seconds. The middle layer reads them; the numbers are\n * what the scheduler has allocated, not measured use.\n */\n\n/** CPU or RAM: what is allocated now, out of the configured capacity when the backend knows it. */\nexport type InstanceStatsCapacity = {\n /** Configured capacity, undefined when the source does not know it. */\n readonly total?: number;\n /** Allocated now. Can exceed `total`: local CPU can be overcommitted. */\n readonly current: number;\n};\n\n/**
|
|
1
|
+
{"version":3,"file":"instance_stats.js","names":[],"sources":["../src/instance_stats.ts"],"sourcesContent":["/**\n * The load of the whole Platforma instance, as the Desktop App shows it in its top bar.\n *\n * The backend keeps one instance statistics context per instance, and its executor runner writes\n * the scheduler's readings into it every few seconds. The middle layer reads them; the numbers are\n * what the scheduler has allocated, not measured use.\n */\n\n/** CPU or RAM: what is allocated now, out of the configured capacity when the backend knows it. */\nexport type InstanceStatsCapacity = {\n /** Configured capacity, undefined when the source does not know it. */\n readonly total?: number;\n /** Allocated now. Can exceed `total`: local CPU can be overcommitted. */\n readonly current: number;\n};\n\n/** Whether the stats were read, and why they carry no numbers when not. */\nexport type InstanceStatsStatus =\n /** Read from the instance statistics context. */\n | \"ok\"\n /** The backend has no instance statistics context. */\n | \"unsupported\"\n /** The context exists but could not be read. */\n | \"unreadable\";\n\n/** One sample of the instance statistics. */\nexport type InstanceStats = {\n readonly status: InstanceStatsStatus;\n /** In millicores. */\n readonly cpu?: InstanceStatsCapacity;\n /** In bytes. */\n readonly ram?: InstanceStatsCapacity;\n /**\n * GPUs. On Kueue, devices held by jobs out of the quota. Locally, jobs that use a GPU on the\n * detected cards; jobs share cards, so `current` can exceed `total`. Undefined when no GPU count\n * is known: a local install without a GPU, or Kubernetes without a GPU pool.\n */\n readonly gpu?: InstanceStatsCapacity;\n /** GPU memory allocated to jobs, in bytes. Set only on a local install with a detected GPU. */\n readonly gpuMemory?: InstanceStatsCapacity;\n /** Jobs holding an allocation, and jobs waiting for one. */\n readonly jobs?: { readonly running: number; readonly queued: number };\n /** Where the numbers come from, `scheduler` or `kueue`. A label only. */\n readonly source?: string;\n};\n\n/** Stats for a backend without the instance statistics context. */\nexport const UnsupportedInstanceStats: InstanceStats = { status: \"unsupported\" };\n"],"mappings":";;AA+CA,MAAa,2BAA0C,EAAE,QAAQ,cAAc"}
|
package/package.json
CHANGED
package/src/instance_stats.ts
CHANGED
|
@@ -14,10 +14,10 @@ export type InstanceStatsCapacity = {
|
|
|
14
14
|
readonly current: number;
|
|
15
15
|
};
|
|
16
16
|
|
|
17
|
-
/**
|
|
18
|
-
export type
|
|
17
|
+
/** Whether the stats were read, and why they carry no numbers when not. */
|
|
18
|
+
export type InstanceStatsStatus =
|
|
19
19
|
/** Read from the instance statistics context. */
|
|
20
|
-
| "
|
|
20
|
+
| "ok"
|
|
21
21
|
/** The backend has no instance statistics context. */
|
|
22
22
|
| "unsupported"
|
|
23
23
|
/** The context exists but could not be read. */
|
|
@@ -25,7 +25,7 @@ export type InstanceStatsAvailability =
|
|
|
25
25
|
|
|
26
26
|
/** One sample of the instance statistics. */
|
|
27
27
|
export type InstanceStats = {
|
|
28
|
-
readonly
|
|
28
|
+
readonly status: InstanceStatsStatus;
|
|
29
29
|
/** In millicores. */
|
|
30
30
|
readonly cpu?: InstanceStatsCapacity;
|
|
31
31
|
/** In bytes. */
|
|
@@ -45,4 +45,4 @@ export type InstanceStats = {
|
|
|
45
45
|
};
|
|
46
46
|
|
|
47
47
|
/** Stats for a backend without the instance statistics context. */
|
|
48
|
-
export const UnsupportedInstanceStats: InstanceStats = {
|
|
48
|
+
export const UnsupportedInstanceStats: InstanceStats = { status: "unsupported" };
|