@@ -0,0 +1,62 @@
|
||||
// SPDX-License-Identifier: LicenseRef-ConusAI-Template-1.0
|
||||
// Explicit synthetic eligibility for local fake-provider fixtures only. No crypto/live proof.
|
||||
import type { ServiceReadiness } from "@conusai-kit/core"
|
||||
import type { OptionalModuleId } from "../../modules/inclusion.js"
|
||||
export const syntheticNativeReadiness: ServiceReadiness = {
|
||||
profile: "postgres",
|
||||
async observe() {
|
||||
return {
|
||||
desiredGeneration: 1,
|
||||
observedGeneration: 1,
|
||||
observedAt: Date.now(),
|
||||
installed: true,
|
||||
enabled: true,
|
||||
entitled: true,
|
||||
authorized: true,
|
||||
configured: true,
|
||||
compatible: true,
|
||||
dependenciesReady: true,
|
||||
partitionBound: "unknown",
|
||||
ready: true,
|
||||
nativeAuthority: {
|
||||
kind: "verified_release_set_v1",
|
||||
policyEpoch: 1,
|
||||
expectedDescriptorDigest: `sha256:${"a".repeat(64)}`,
|
||||
observedDescriptorDigest: `sha256:${"a".repeat(64)}`,
|
||||
expectedSourceCommit: "b".repeat(40),
|
||||
observedSourceCommit: "b".repeat(40),
|
||||
authorityCheckedAt: Date.now(),
|
||||
},
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
/**
|
||||
* The optional modules whose source this app holds, as `modules/index.ts` composes them. `kit template:prune
|
||||
* --without` removes a line with its module, so a journey that asks for a pruned module runs without it.
|
||||
*/
|
||||
const WITH_SOURCE: readonly OptionalModuleId[] = [
|
||||
"activities",
|
||||
"archive",
|
||||
"catalog",
|
||||
"crm",
|
||||
"inventory",
|
||||
"invoicing",
|
||||
"ledger",
|
||||
"documents", // kit:documents
|
||||
"knowledge", // kit:knowledge
|
||||
"agent", // kit:agent
|
||||
"guides", // kit:guides
|
||||
"support", // kit:support
|
||||
]
|
||||
|
||||
/** A journey opts in only to the modules it exercises, of those this app has; unknown IDs remain off. */
|
||||
export function selectedModules(requested: readonly OptionalModuleId[]) {
|
||||
const selected = requested.filter((id) => WITH_SOURCE.includes(id))
|
||||
const record = { schemaVersion: 1 as const, selected, everAdopted: selected }
|
||||
return {
|
||||
moduleInclusion: record,
|
||||
moduleSelected: (id: OptionalModuleId) => selected.includes(id),
|
||||
moduleAdopted: (id: OptionalModuleId) => record.everAdopted.includes(id),
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user