@inflatable-cookie/longhorn 0.1.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/LICENSE +21 -0
- package/README.md +38 -0
- package/package.json +205 -0
- package/src/agent-control/index.ts +20 -0
- package/src/agent-control/inject.ts +4 -0
- package/src/agent-control/shim.ts +722 -0
- package/src/bridge/direct.ts +22 -0
- package/src/bridge/generated/fields.ts +32 -0
- package/src/bridge/generated/protocol.ts +218 -0
- package/src/bridge/generated/variant-fields.ts +10 -0
- package/src/bridge/index.ts +15 -0
- package/src/bridge/job.ts +51 -0
- package/src/bridge/loopback.ts +84 -0
- package/src/bridge/operation.ts +166 -0
- package/src/bridge/router.ts +71 -0
- package/src/bridge/runtime/connection.ts +318 -0
- package/src/bridge/runtime/policy.ts +89 -0
- package/src/bridge/runtime/retry.ts +60 -0
- package/src/bridge/runtime.ts +3 -0
- package/src/bridge/session.ts +67 -0
- package/src/bridge/stream/connection.ts +146 -0
- package/src/bridge/stream/source.ts +61 -0
- package/src/bridge/stream/tracker.ts +109 -0
- package/src/bridge/stream.ts +6 -0
- package/src/bridge/supervision.ts +204 -0
- package/src/bridge/validation/base.ts +164 -0
- package/src/bridge/validation/jobs.ts +105 -0
- package/src/bridge/validation/negotiation.ts +242 -0
- package/src/bridge/validation/operations.ts +213 -0
- package/src/bridge/validation/streams.ts +47 -0
- package/src/bridge/validation.ts +5 -0
- package/src/commands/client.ts +124 -0
- package/src/commands/controller.ts +411 -0
- package/src/commands/generated/fields.ts +43 -0
- package/src/commands/generated/protocol.ts +876 -0
- package/src/commands/generated/variant-fields.ts +88 -0
- package/src/commands/index.ts +13 -0
- package/src/commands/keyboard.ts +361 -0
- package/src/commands/ports.ts +82 -0
- package/src/commands/projectors.ts +306 -0
- package/src/commands/validation.ts +444 -0
- package/src/config/client.ts +215 -0
- package/src/config/generated/base.ts +714 -0
- package/src/config/generated/fields.ts +54 -0
- package/src/config/generated/label-template.ts +14 -0
- package/src/config/generated/labels.ts +30 -0
- package/src/config/generated/protocol.ts +3 -0
- package/src/config/generated/restore.ts +658 -0
- package/src/config/generated/variant-fields.ts +129 -0
- package/src/config/index.ts +12 -0
- package/src/config/names.ts +19 -0
- package/src/config/validation/commands.ts +155 -0
- package/src/config/validation/outcomes.ts +243 -0
- package/src/config/validation/primitives.ts +174 -0
- package/src/config/validation/projection.ts +351 -0
- package/src/config/validation.ts +7 -0
- package/src/core/connection.ts +252 -0
- package/src/core/index.ts +2 -0
- package/src/core/transport.ts +24 -0
- package/src/history/client.ts +65 -0
- package/src/history/controller.ts +385 -0
- package/src/history/direct.ts +21 -0
- package/src/history/generated/fields.ts +18 -0
- package/src/history/generated/protocol.ts +389 -0
- package/src/history/generated/variant-fields.ts +27 -0
- package/src/history/index.ts +13 -0
- package/src/history/ports.ts +31 -0
- package/src/history/serialized.ts +38 -0
- package/src/history/validation.ts +334 -0
- package/src/history-tree/client.ts +16 -0
- package/src/history-tree/controller.ts +199 -0
- package/src/history-tree/direct.ts +3 -0
- package/src/history-tree/generated/fields.ts +26 -0
- package/src/history-tree/generated/protocol.ts +711 -0
- package/src/history-tree/generated/variant-fields.ts +39 -0
- package/src/history-tree/index.ts +13 -0
- package/src/history-tree/ports.ts +43 -0
- package/src/history-tree/serialized.ts +15 -0
- package/src/history-tree/validation.ts +269 -0
- package/src/layout/generated/protocol.ts +289 -0
- package/src/layout/index.ts +4 -0
- package/src/layout/ratio.ts +22 -0
- package/src/layout/validation.ts +110 -0
- package/src/layout/visibility.ts +30 -0
- package/src/licence/client.ts +32 -0
- package/src/licence/controller.ts +301 -0
- package/src/licence/direct.ts +3 -0
- package/src/licence/generated/fields.ts +17 -0
- package/src/licence/generated/key-conformance.json +42 -0
- package/src/licence/generated/protocol.ts +249 -0
- package/src/licence/generated/variant-fields.ts +34 -0
- package/src/licence/index.ts +14 -0
- package/src/licence/key.ts +125 -0
- package/src/licence/ports.ts +39 -0
- package/src/licence/serialized.ts +13 -0
- package/src/licence/validation.ts +226 -0
- package/src/native-content/client.ts +474 -0
- package/src/native-content/direct.ts +16 -0
- package/src/native-content/generated/fields.ts +32 -0
- package/src/native-content/generated/protocol.ts +498 -0
- package/src/native-content/generated/variant-fields.ts +77 -0
- package/src/native-content/index.ts +12 -0
- package/src/native-content/ports.ts +46 -0
- package/src/native-content/serialized.ts +50 -0
- package/src/native-content/validation/base.ts +194 -0
- package/src/native-content/validation/messages.ts +192 -0
- package/src/native-content/validation/state.ts +404 -0
- package/src/native-content/validation.ts +7 -0
- package/src/notifications/client.ts +106 -0
- package/src/notifications/controller.ts +240 -0
- package/src/notifications/direct.ts +12 -0
- package/src/notifications/generated/fields.ts +19 -0
- package/src/notifications/generated/labels.ts +20 -0
- package/src/notifications/generated/protocol.ts +522 -0
- package/src/notifications/generated/variant-fields.ts +37 -0
- package/src/notifications/index.ts +16 -0
- package/src/notifications/ports.ts +22 -0
- package/src/notifications/serialized.ts +27 -0
- package/src/notifications/toast.ts +41 -0
- package/src/notifications/tone.ts +27 -0
- package/src/notifications/validation.ts +246 -0
- package/src/operation/bridge.ts +168 -0
- package/src/operation/client.ts +167 -0
- package/src/operation/controller.ts +321 -0
- package/src/operation/direct.ts +15 -0
- package/src/operation/generated/fields.ts +20 -0
- package/src/operation/generated/labels.ts +15 -0
- package/src/operation/generated/protocol.ts +762 -0
- package/src/operation/generated/variant-fields.ts +60 -0
- package/src/operation/index.ts +14 -0
- package/src/operation/ports.ts +29 -0
- package/src/operation/serialized.ts +39 -0
- package/src/operation/validation.ts +479 -0
- package/src/settings/client.ts +142 -0
- package/src/settings/connection.ts +246 -0
- package/src/settings/generated/fields.ts +34 -0
- package/src/settings/generated/protocol.ts +668 -0
- package/src/settings/generated/variant-fields.ts +26 -0
- package/src/settings/index.ts +12 -0
- package/src/settings/names.ts +8 -0
- package/src/settings/registry.ts +141 -0
- package/src/settings/validation/authority.ts +66 -0
- package/src/settings/validation/command.ts +165 -0
- package/src/settings/validation/error.ts +33 -0
- package/src/settings/validation/primitives.ts +203 -0
- package/src/settings/validation/projection.ts +50 -0
- package/src/settings/validation/registry.ts +170 -0
- package/src/settings/validation.ts +4 -0
- package/src/surface-transfer/client.ts +54 -0
- package/src/surface-transfer/generated/fields.ts +12 -0
- package/src/surface-transfer/generated/protocol.ts +61 -0
- package/src/surface-transfer/generated/variant-fields.ts +30 -0
- package/src/surface-transfer/index.ts +9 -0
- package/src/surface-transfer/validation.ts +209 -0
- package/src/surfaces/client.ts +140 -0
- package/src/surfaces/generated/fields.ts +19 -0
- package/src/surfaces/generated/protocol.ts +217 -0
- package/src/surfaces/generated/variant-fields.ts +42 -0
- package/src/surfaces/index.ts +9 -0
- package/src/surfaces/validation.ts +199 -0
- package/src/transfer/client.ts +133 -0
- package/src/transfer/connection.ts +87 -0
- package/src/transfer/generated/fields.ts +23 -0
- package/src/transfer/generated/protocol.ts +171 -0
- package/src/transfer/generated/variant-fields.ts +45 -0
- package/src/transfer/index.ts +11 -0
- package/src/transfer/payload.ts +71 -0
- package/src/transfer/validation.ts +282 -0
- package/src/update/client.ts +29 -0
- package/src/update/controller.ts +255 -0
- package/src/update/direct.ts +3 -0
- package/src/update/generated/fields.ts +14 -0
- package/src/update/generated/protocol.ts +238 -0
- package/src/update/generated/variant-fields.ts +44 -0
- package/src/update/index.ts +14 -0
- package/src/update/ports.ts +36 -0
- package/src/update/serialized.ts +12 -0
- package/src/update/validation.ts +191 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// @generated by `effigy generate:config`; do not edit.
|
|
2
|
+
// Allowed field names per protocol type, from the Rust structs.
|
|
3
|
+
// A `record()` given one of these rejects unknown and missing keys —
|
|
4
|
+
// contract 010's Boundary Validation Target.
|
|
5
|
+
|
|
6
|
+
export const CONFIG_FIELDS: Record<string, readonly string[]> = {
|
|
7
|
+
"StorageRootProjection": ["kind", "path", "provenance"],
|
|
8
|
+
"StorageLayoutProjection": ["profile", "platform", "canonicalApplicationId", "effectiveLeaf", "leafProvenance", "roots", "warnings", "layoutDigest"],
|
|
9
|
+
"StorageOperationsProjection": ["layout", "bootstrap", "availableProfiles"],
|
|
10
|
+
"StorageTransitionDomainProjection": ["domainId", "storageClass", "action", "sourcePath", "targetPath", "sourceSha256"],
|
|
11
|
+
"StorageTransitionConflictProjection": ["kind", "path", "detail"],
|
|
12
|
+
"StorageTransitionPreviewProjection": ["sourceLayoutDigest", "targetLayoutDigest", "targetProfile", "domains", "unknownSourcePaths", "conflicts", "evidenceDigest", "confirmationDigest"],
|
|
13
|
+
"StorageTransitionReceiptProjection": ["transitionId", "outcome", "targetLayoutDigest", "copiedDomainIds", "customDomainIds", "retainedSourcePaths", "receiptDigest"],
|
|
14
|
+
"StorageRecoveryReceiptProjection": ["transitionId", "outcome", "activeLayoutDigest", "detail"],
|
|
15
|
+
"StorageCleanupReceiptProjection": ["transitionId", "transitionReceiptDigest", "removedPaths"],
|
|
16
|
+
"BackupArchiveProjection": ["path", "archiveId", "createdAt", "kind", "archiveSha256"],
|
|
17
|
+
"BackupInventoryEntry": ["path", "state", "diagnosticKind", "detail"],
|
|
18
|
+
"BackupInventoryProjection": ["root", "archives", "entries", "complete"],
|
|
19
|
+
"BackupRetentionProjection": ["deletionPaths", "retained", "diagnostics", "confirmationDigest"],
|
|
20
|
+
"BackupOperationsProjection": ["inventory", "pending", "encryption", "retention"],
|
|
21
|
+
"ConfigOperationsSnapshot": ["protocolVersion", "generation", "capabilities", "storage", "backup", "restore"],
|
|
22
|
+
"ConfigSnapshotCommand": ["protocolVersion", "requestId"],
|
|
23
|
+
"StorageTransitionInspectCommand": ["protocolVersion", "requestId", "targetProfile", "includeLogs"],
|
|
24
|
+
"StorageTransitionExecuteCommand": ["protocolVersion", "requestId", "generation", "confirmationDigest"],
|
|
25
|
+
"StorageRecoveryCommand": ["protocolVersion", "requestId"],
|
|
26
|
+
"StorageCleanupCommand": ["protocolVersion", "requestId", "transitionId", "transitionReceiptDigest"],
|
|
27
|
+
"BackupCreateCommand": ["protocolVersion", "requestId", "pendingPolicy"],
|
|
28
|
+
"BackupExportCommand": ["protocolVersion", "requestId", "archiveSha256"],
|
|
29
|
+
"BackupRetentionApplyCommand": ["protocolVersion", "requestId", "generation", "confirmationDigest"],
|
|
30
|
+
"ConfigOperationRejection": ["code", "detail", "snapshot"],
|
|
31
|
+
"BackupCaptureReceiptProjection": ["selectedDomains", "capturedDomains", "absentDomains", "sourcePreservedDomains", "excludedDomains", "customDomains", "externalConsistencyGroups", "totalPayloadBytes", "flushedPendingPublication"],
|
|
32
|
+
"BackupPublicationReceiptProjection": ["path", "destination", "archiveSha256", "durability", "replacedExisting"],
|
|
33
|
+
"RestoreOperationsProjection": ["state", "safetyBackupSha256"],
|
|
34
|
+
"RestoreIdentityProjection": ["application", "producer"],
|
|
35
|
+
"RestoreConsistencyGroupProjection": ["id", "mode", "authority"],
|
|
36
|
+
"RestoreDomainInspectionProjection": ["domainId", "storageClass", "consistencyGroup", "adapter", "sourceState", "sourceSchemaVersion", "targetSchemaVersion", "compatibility"],
|
|
37
|
+
"RestoreExclusionProjection": ["domainId", "storageClass", "reason", "registered"],
|
|
38
|
+
"RestoreInspectionReceiptProjection": ["manifestDomains", "exclusions", "restorable", "migrations", "adapterRestorable", "blocked"],
|
|
39
|
+
"RestoreInspectionProjection": ["archiveSha256", "archiveId", "createdAt", "kind", "applicationVersion", "producerVersion", "integrity", "authenticity", "identity", "consistencyGroups", "domains", "exclusions", "receipt"],
|
|
40
|
+
"RestoreInspectCommand": ["protocolVersion", "requestId", "selection"],
|
|
41
|
+
"RestoreDomainChoice": ["domainId", "choice"],
|
|
42
|
+
"RestorePlanEntryProjection": ["domainId", "choice", "action", "current"],
|
|
43
|
+
"RestorePlanReceiptProjection": ["selected", "skipped", "creates", "replaces", "deletes", "migrations", "unchanged"],
|
|
44
|
+
"RestorePlanProjection": ["archiveSha256", "confirmationDigest", "entries", "receipt"],
|
|
45
|
+
"RestorePlanCommand": ["protocolVersion", "requestId", "generation", "archiveSha256", "choices"],
|
|
46
|
+
"RestoreExecuteCommand": ["protocolVersion", "requestId", "generation", "confirmationDigest"],
|
|
47
|
+
"RestoreStagingReceiptProjection": ["selected", "documents", "deletions", "unchanged", "totalDocumentBytes"],
|
|
48
|
+
"RestoreExecutionReceiptProjection": ["confirmationDigest", "staging", "safetyBackup", "restoredDomainIds", "deletedDomainIds", "migratedDomainIds", "unchangedDomainIds", "skippedDomainIds", "excludedDomainIds"],
|
|
49
|
+
"RestoreExecutionFailureProjection": ["stage", "domainId", "terminal", "detail"],
|
|
50
|
+
"RestoreAdapterExecuteCommand": ["protocolVersion", "requestId", "generation", "archiveSha256", "domainId", "confirmationDigest", "requirement"],
|
|
51
|
+
"RestoreAdapterReceiptProjection": ["domainId", "adapter", "participation", "confirmationDigest", "outcome", "evidence"],
|
|
52
|
+
"RestoreRecoveryCommand": ["protocolVersion", "requestId"],
|
|
53
|
+
"RestoreRecoveryReceiptProjection": ["outcome", "domainIds"],
|
|
54
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// @generated by `effigy generate:config`; do not edit.
|
|
2
|
+
// Mirrors `longhorn_config::render_label_template`. One substitution rule: a
|
|
3
|
+
// placeholder is a name in braces, and anything else is literal. An unknown
|
|
4
|
+
// placeholder is left as written, so a mistake shows as `{typo}` on screen
|
|
5
|
+
// rather than a hole that reads like intentional wording.
|
|
6
|
+
|
|
7
|
+
export function renderLabelTemplate(
|
|
8
|
+
template: string,
|
|
9
|
+
fields: Readonly<Record<string, string>>,
|
|
10
|
+
): string {
|
|
11
|
+
return template.replace(/\{([^{}]*)\}/g, (match, name: string) =>
|
|
12
|
+
Object.hasOwn(fields, name) ? fields[name]! : match,
|
|
13
|
+
);
|
|
14
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// @generated by `effigy generate:config`; do not edit.
|
|
2
|
+
// Wording lives in Rust, on the enum that owns it. A label edited here is
|
|
3
|
+
// a label that disagrees with the native surface.
|
|
4
|
+
|
|
5
|
+
import type { RestoreAuthenticityProjection, RestoreDomainCompatibilityProjection, RestoreIntegrityProjection } from "./protocol.ts";
|
|
6
|
+
|
|
7
|
+
export const RESTORE_INTEGRITY_LABELS: Record<RestoreIntegrityProjection, string> = {
|
|
8
|
+
verified: "Verified",
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export const RESTORE_AUTHENTICITY_LABELS: Record<RestoreAuthenticityProjection, string> = {
|
|
12
|
+
unauthenticated: "Unauthenticated",
|
|
13
|
+
authenticated: "Authenticated",
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const RESTORE_COMPATIBILITY_LABEL_TEMPLATES: Record<RestoreDomainCompatibilityProjection["status"], string> = {
|
|
17
|
+
ready: "Ready",
|
|
18
|
+
migrationRequired: "Migration required ({from} → {to})",
|
|
19
|
+
unknownDomain: "Unknown domain",
|
|
20
|
+
descriptorMismatch: "Descriptor mismatch",
|
|
21
|
+
domainCodeUnavailable: "Domain code unavailable",
|
|
22
|
+
policyExcluded: "Policy excluded: {reason}",
|
|
23
|
+
customAdapterUnavailable: "Adapter unavailable: {adapter}",
|
|
24
|
+
customAdapterReady: "Custom adapter ready: {adapter}",
|
|
25
|
+
customAdapterRejected: "Adapter rejected: {adapter} — {detail}",
|
|
26
|
+
targetUnavailable: "Target unavailable: {reason}",
|
|
27
|
+
sourcePreserved: "Source preserved: {issue}",
|
|
28
|
+
sourceRejected: "Source rejected: {issue}",
|
|
29
|
+
targetPreparationFailed: "Target preparation failed: {detail}",
|
|
30
|
+
};
|