@cosmicdrift/kumiko-framework 0.411.0 → 0.413.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/agents/api/framework-db.md +1 -1
- package/agents/api/framework-engine.md +48 -1
- package/agents/api/framework-errors.md +2 -0
- package/agents/api/types.md +8 -0
- package/agents/api.md +2 -2
- package/agents/boot-rules.md +343 -0
- package/agents/examples/api-docs.md +710 -0
- package/agents/examples/golden-path.md +11 -11
- package/agents/examples/{contact.md → helpdesk.md} +31 -31
- package/agents/examples.md +2 -1
- package/agents/features-index.md +2 -2
- package/agents/features.md +16 -16
- package/dist/api/auth-middleware.d.ts +1 -0
- package/dist/api/index.d.ts +3 -0
- package/dist/api/index.js +3 -0
- package/dist/api/pat-auth-reject.d.ts +7 -0
- package/dist/api/pat-auth-reject.js +7 -0
- package/dist/api/server-middleware.js +2 -1
- package/dist/compliance/sub-processors.js +2 -2
- package/dist/config/index.d.ts +25 -0
- package/dist/config/index.js +28 -1
- package/dist/db/event-store-executor-read-paging.d.ts +1 -0
- package/dist/db/event-store-executor-read-paging.js +2 -1
- package/dist/db/read-gate-clause.js +26 -7
- package/dist/db/table-builder.d.ts +1 -2
- package/dist/engine/boot-validator/boot-report.d.ts +3 -0
- package/dist/engine/boot-validator/boot-report.js +2 -2
- package/dist/engine/boot-validator/boot-rules.d.ts +570 -0
- package/dist/engine/boot-validator/boot-rules.js +20 -0
- package/dist/engine/boot-validator/definition-config-events-jobs-rules.d.ts +77 -0
- package/dist/engine/boot-validator/definition-config-events-jobs-rules.js +77 -0
- package/dist/engine/boot-validator/definition-events-rules.d.ts +42 -0
- package/dist/engine/boot-validator/definition-events-rules.js +42 -0
- package/dist/engine/boot-validator/definition-feature-rules.d.ts +42 -0
- package/dist/engine/boot-validator/definition-feature-rules.js +42 -0
- package/dist/engine/boot-validator/definition-field-factories-rules.d.ts +17 -0
- package/dist/engine/boot-validator/definition-field-factories-rules.js +17 -0
- package/dist/engine/boot-validator/definition-handlers-rules.d.ts +72 -0
- package/dist/engine/boot-validator/definition-handlers-rules.js +72 -0
- package/dist/engine/boot-validator/definition-ownership-from-rules.d.ts +27 -0
- package/dist/engine/boot-validator/definition-ownership-from-rules.js +27 -0
- package/dist/engine/boot-validator/definition-probes-rules.d.ts +47 -0
- package/dist/engine/boot-validator/definition-probes-rules.js +47 -0
- package/dist/engine/boot-validator/definition-role-assignment-rules.d.ts +27 -0
- package/dist/engine/boot-validator/definition-role-assignment-rules.js +27 -0
- package/dist/engine/boot-validator/definition-ui-extensions-rules.d.ts +197 -0
- package/dist/engine/boot-validator/definition-ui-extensions-rules.js +197 -0
- package/dist/engine/boot-validator/definition-webhook-events-rules.d.ts +32 -0
- package/dist/engine/boot-validator/definition-webhook-events-rules.js +32 -0
- package/dist/engine/define-feature.js +29 -9
- package/dist/engine/define-handler.js +8 -4
- package/dist/engine/definition-violations.d.ts +14 -0
- package/dist/engine/definition-violations.js +71 -0
- package/dist/engine/entity-handlers.js +39 -13
- package/dist/engine/entity-list-runtime-options.js +12 -0
- package/dist/engine/event-def.js +32 -12
- package/dist/engine/factories.d.ts +2 -0
- package/dist/engine/factories.js +16 -5
- package/dist/engine/feature-builder-state.d.ts +2 -1
- package/dist/engine/feature-builder-state.js +1 -0
- package/dist/engine/feature-config-events-jobs.js +63 -27
- package/dist/engine/feature-entity-handlers.js +15 -6
- package/dist/engine/feature-probes.js +29 -9
- package/dist/engine/feature-ui-extensions.js +178 -92
- package/dist/engine/index.d.ts +5 -2
- package/dist/engine/index.js +4 -1
- package/dist/engine/object-form.js +8 -2
- package/dist/engine/ownership.js +17 -5
- package/dist/engine/registry-facade.js +13 -0
- package/dist/engine/role-assignment.js +17 -5
- package/dist/engine/webhook-contracts.d.ts +12 -0
- package/dist/engine/webhook-contracts.js +172 -0
- package/dist/engine/webhook-events.d.ts +34 -0
- package/dist/engine/webhook-events.js +85 -0
- package/dist/errors/docs-url.js +2 -19
- package/dist/errors/error-codes.d.ts +20 -0
- package/dist/errors/error-codes.js +19 -0
- package/dist/errors/index.d.ts +2 -0
- package/dist/errors/index.js +1 -0
- package/dist/files/file-routes.js +1 -1
- package/dist/i18n/required-surface-keys.d.ts +4 -0
- package/dist/i18n/required-surface-keys.js +15 -0
- package/dist/schema-cli/shared.d.ts +11 -0
- package/dist/schema-cli/shared.js +37 -3
- package/dist/schema-cli/validate-command.js +10 -3
- package/package.json +3 -3
- package/src/changes.json +42 -0
|
@@ -2886,5 +2886,575 @@ export declare const FRAMEWORK_BOOT_RULE_TABLES: readonly [{
|
|
|
2886
2886
|
readonly summary: 'A write handler with agent.effect "proposal" declares agent.risk "low".';
|
|
2887
2887
|
readonly fix: 'Set agent.risk to "low", or drop agent.effect so the agent asks for approval.';
|
|
2888
2888
|
};
|
|
2889
|
+
}, {
|
|
2890
|
+
readonly jobMaintenanceTriggerInvalid: {
|
|
2891
|
+
readonly id: "job/maintenance-trigger-invalid";
|
|
2892
|
+
readonly summary: "A job maintenance trigger has the value true.";
|
|
2893
|
+
readonly fix: "Use trigger { maintenance: true }.";
|
|
2894
|
+
};
|
|
2895
|
+
readonly jobWakesSleepingAppInvalid: {
|
|
2896
|
+
readonly id: "job/wakes-sleeping-app-invalid";
|
|
2897
|
+
readonly summary: "wakesSleepingApp is false and only on cron or maintenance triggers.";
|
|
2898
|
+
readonly fix: "Use wakesSleepingApp: false on a cron or maintenance trigger, or omit it.";
|
|
2899
|
+
};
|
|
2900
|
+
readonly jobCronTimezoneInvalid: {
|
|
2901
|
+
readonly id: "job/cron-timezone-invalid";
|
|
2902
|
+
readonly summary: "A cron trigger tz is an IANA time zone name.";
|
|
2903
|
+
readonly fix: 'Use a zone name such as "Europe/Berlin".';
|
|
2904
|
+
};
|
|
2905
|
+
readonly jobEscapeHatchInvalid: {
|
|
2906
|
+
readonly id: "job/escape-hatch-invalid";
|
|
2907
|
+
readonly summary: "A job escapeHatch carries a valid reason and grants.";
|
|
2908
|
+
readonly fix: "Fix the escapeHatch reason or grants as the message describes.";
|
|
2909
|
+
};
|
|
2910
|
+
readonly configSingleKeyNeedsDefinition: {
|
|
2911
|
+
readonly id: "config/single-key-needs-definition";
|
|
2912
|
+
readonly summary: "The single-key config() form receives a definition as second argument.";
|
|
2913
|
+
readonly fix: "Pass the key definition as the second argument.";
|
|
2914
|
+
};
|
|
2915
|
+
readonly eventMigrationStepSize: {
|
|
2916
|
+
readonly id: "event/migration-step-size";
|
|
2917
|
+
readonly summary: "Event migrations move exactly one version up.";
|
|
2918
|
+
readonly fix: "Declare each version step separately with toVersion = fromVersion + 1.";
|
|
2919
|
+
};
|
|
2920
|
+
readonly eventMigrationFromVersionInvalid: {
|
|
2921
|
+
readonly id: "event/migration-from-version-invalid";
|
|
2922
|
+
readonly summary: "Event migrations start at fromVersion 1 or higher.";
|
|
2923
|
+
readonly fix: "Set fromVersion to 1 or higher.";
|
|
2924
|
+
};
|
|
2925
|
+
readonly eventMigrationDuplicateStep: {
|
|
2926
|
+
readonly id: "event/migration-duplicate-step";
|
|
2927
|
+
readonly summary: "Each event migration step is declared once.";
|
|
2928
|
+
readonly fix: "Remove the duplicate migration for that fromVersion.";
|
|
2929
|
+
};
|
|
2930
|
+
readonly eventMigrationRenameCollision: {
|
|
2931
|
+
readonly id: "event/migration-rename-collision";
|
|
2932
|
+
readonly summary: "A declarative migration maps at most one source to each rename target.";
|
|
2933
|
+
readonly fix: "Rename only one source field to the target.";
|
|
2934
|
+
};
|
|
2935
|
+
readonly metricDuplicate: {
|
|
2936
|
+
readonly id: "metric/name-duplicate";
|
|
2937
|
+
readonly summary: "Metric names are unique per feature.";
|
|
2938
|
+
readonly fix: "Rename one of the metrics.";
|
|
2939
|
+
};
|
|
2940
|
+
readonly envSchemaTwice: {
|
|
2941
|
+
readonly id: "env-schema/declared-twice";
|
|
2942
|
+
readonly summary: "A feature calls r.envSchema() at most once.";
|
|
2943
|
+
readonly fix: "Compose all env keys into one Zod object.";
|
|
2944
|
+
};
|
|
2945
|
+
readonly secretDuplicate: {
|
|
2946
|
+
readonly id: "secret/key-duplicate";
|
|
2947
|
+
readonly summary: "Secret key names are unique per feature.";
|
|
2948
|
+
readonly fix: "Rename one of the secrets.";
|
|
2949
|
+
};
|
|
2950
|
+
readonly secretWriteRolesEmpty: {
|
|
2951
|
+
readonly id: "secret/write-roles-empty";
|
|
2952
|
+
readonly summary: "A secret or namespace writeRoles list is non-empty.";
|
|
2953
|
+
readonly fix: "Add roles or omit writeRoles to use the secrets handler access.";
|
|
2954
|
+
};
|
|
2955
|
+
readonly secretNamespaceDuplicate: {
|
|
2956
|
+
readonly id: "secret/namespace-duplicate";
|
|
2957
|
+
readonly summary: "Secret namespace names are unique per feature.";
|
|
2958
|
+
readonly fix: "Rename one of the namespaces.";
|
|
2959
|
+
};
|
|
2960
|
+
readonly claimKeyDuplicate: {
|
|
2961
|
+
readonly id: "claim/key-duplicate";
|
|
2962
|
+
readonly summary: "Claim short names are unique per feature.";
|
|
2963
|
+
readonly fix: "Rename one of the claims.";
|
|
2964
|
+
};
|
|
2965
|
+
}, {
|
|
2966
|
+
readonly piiOwnerNotString: {
|
|
2967
|
+
readonly id: "event/pii-owner-not-string";
|
|
2968
|
+
readonly summary: "A PII owner field of an event payload is a string.";
|
|
2969
|
+
readonly fix: 'Use a string owner field or declare whenAbsent ("tenant", "self" or "plaintext").';
|
|
2970
|
+
};
|
|
2971
|
+
readonly piiOwnerNullable: {
|
|
2972
|
+
readonly id: "event/pii-owner-nullable";
|
|
2973
|
+
readonly summary: "A nullable PII owner field of an event declares whenAbsent.";
|
|
2974
|
+
readonly fix: 'Declare whenAbsent as "tenant", "self" or "plaintext".';
|
|
2975
|
+
};
|
|
2976
|
+
readonly piiFieldNotInSchema: {
|
|
2977
|
+
readonly id: "event/pii-field-not-in-schema";
|
|
2978
|
+
readonly summary: "Event piiFields reference fields of the payload schema.";
|
|
2979
|
+
readonly fix: "Name an existing payload field.";
|
|
2980
|
+
};
|
|
2981
|
+
readonly piiSelfOwner: {
|
|
2982
|
+
readonly id: "event/pii-self-owner";
|
|
2983
|
+
readonly summary: "An event PII field is not its own owner field.";
|
|
2984
|
+
readonly fix: "Point the owner at a separate user id field.";
|
|
2985
|
+
};
|
|
2986
|
+
readonly piiOwnerIsId: {
|
|
2987
|
+
readonly id: "event/pii-owner-is-id";
|
|
2988
|
+
readonly summary: 'Event PII fields do not use "id" as owner field.';
|
|
2989
|
+
readonly fix: 'Use personal: "self" for record-owned event fields.';
|
|
2990
|
+
};
|
|
2991
|
+
readonly piiStanceMissing: {
|
|
2992
|
+
readonly id: "event/pii-stance-missing";
|
|
2993
|
+
readonly summary: "Events declare an explicit PII stance.";
|
|
2994
|
+
readonly fix: 'Pass piiFields with owned fields or piiFields: "none".';
|
|
2995
|
+
};
|
|
2996
|
+
readonly piiStanceEmpty: {
|
|
2997
|
+
readonly id: "event/pii-stance-empty";
|
|
2998
|
+
readonly summary: "An empty piiFields object is not a stance.";
|
|
2999
|
+
readonly fix: 'Use piiFields: "none" for payloads without personal data.';
|
|
3000
|
+
};
|
|
3001
|
+
readonly versionInvalid: {
|
|
3002
|
+
readonly id: "event/version-invalid";
|
|
3003
|
+
readonly summary: "Event version is a positive integer.";
|
|
3004
|
+
readonly fix: "Set version to an integer of 1 or higher.";
|
|
3005
|
+
};
|
|
3006
|
+
}, {
|
|
3007
|
+
readonly dedupeOptionsNotComparable: {
|
|
3008
|
+
readonly id: "feature/dedupe-options-not-comparable";
|
|
3009
|
+
readonly summary: "dedupeOptions values are primitives or stable function references.";
|
|
3010
|
+
readonly fix: "Replace nested objects in dedupeOptions with primitives or a module-level function reference.";
|
|
3011
|
+
};
|
|
3012
|
+
readonly describeTwice: {
|
|
3013
|
+
readonly id: "feature/describe-twice";
|
|
3014
|
+
readonly summary: "A feature calls r.describe() at most once.";
|
|
3015
|
+
readonly fix: "Remove the second r.describe() call.";
|
|
3016
|
+
};
|
|
3017
|
+
readonly describeTextEmpty: {
|
|
3018
|
+
readonly id: "feature/describe-text-empty";
|
|
3019
|
+
readonly summary: "r.describe() receives a non-empty string.";
|
|
3020
|
+
readonly fix: "Pass a non-empty description text.";
|
|
3021
|
+
};
|
|
3022
|
+
readonly requiresNeedsFeatures: {
|
|
3023
|
+
readonly id: "feature/requires-needs-features";
|
|
3024
|
+
readonly summary: "r.requires() receives { features: string[] }.";
|
|
3025
|
+
readonly fix: 'Pass the feature names as r.requires({ features: ["other-feature"] }).';
|
|
3026
|
+
};
|
|
3027
|
+
readonly toggleableTwice: {
|
|
3028
|
+
readonly id: "feature/toggleable-twice";
|
|
3029
|
+
readonly summary: "A feature calls r.toggleable() at most once.";
|
|
3030
|
+
readonly fix: "Remove the second r.toggleable() call.";
|
|
3031
|
+
};
|
|
3032
|
+
readonly uiHintsTwice: {
|
|
3033
|
+
readonly id: "feature/ui-hints-twice";
|
|
3034
|
+
readonly summary: "A feature calls r.uiHints() at most once.";
|
|
3035
|
+
readonly fix: "Merge all UI hints into a single r.uiHints() call.";
|
|
3036
|
+
};
|
|
3037
|
+
readonly argumentMissing: {
|
|
3038
|
+
readonly id: "registrar/argument-missing";
|
|
3039
|
+
readonly summary: "Every registrar method receives all its required arguments.";
|
|
3040
|
+
readonly fix: "Pass the missing argument named in the message.";
|
|
3041
|
+
};
|
|
3042
|
+
readonly optionsObjectRequired: {
|
|
3043
|
+
readonly id: "registrar/options-object-required";
|
|
3044
|
+
readonly summary: "Object-form registrar methods take one options object.";
|
|
3045
|
+
readonly fix: "Pass a single options object such as r.entity({ name: ... }).";
|
|
3046
|
+
};
|
|
3047
|
+
}, {
|
|
3048
|
+
readonly personalRecordOwnerWhenAbsent: {
|
|
3049
|
+
readonly id: "field/personal-record-owner-when-absent";
|
|
3050
|
+
readonly summary: 'personal: { of: "id" } sets no whenAbsent.';
|
|
3051
|
+
readonly fix: "Remove whenAbsent from the record-owned stance.";
|
|
3052
|
+
};
|
|
3053
|
+
readonly userReferenceNotPersonal: {
|
|
3054
|
+
readonly id: "field/user-reference-not-personal";
|
|
3055
|
+
readonly summary: "A reference to the user entity is personal data.";
|
|
3056
|
+
readonly fix: 'Drop personal: false or use { personal: "ref" }.';
|
|
3057
|
+
};
|
|
3058
|
+
readonly decimalPrecisionScaleInvalid: {
|
|
3059
|
+
readonly id: "field/decimal-precision-scale-invalid";
|
|
3060
|
+
readonly summary: "Decimal precision is at least 1 and scale lies between 0 and precision.";
|
|
3061
|
+
readonly fix: "Use integers with 1 <= precision and 0 <= scale <= precision.";
|
|
3062
|
+
};
|
|
3063
|
+
}, {
|
|
3064
|
+
readonly escapeHatchAccessNotSystemAdmin: {
|
|
3065
|
+
readonly id: "handler/escape-hatch-not-system-admin";
|
|
3066
|
+
readonly summary: "A handler with escapeHatch is restricted to SystemAdmin.";
|
|
3067
|
+
readonly fix: "Set access to { roles: [SystemAdmin] }.";
|
|
3068
|
+
};
|
|
3069
|
+
readonly nameWithoutColon: {
|
|
3070
|
+
readonly id: "handler/name-pattern-invalid";
|
|
3071
|
+
readonly summary: 'Entity handler names use the "<entity>:<verb>" pattern.';
|
|
3072
|
+
readonly fix: 'Name the handler like "note:create".';
|
|
3073
|
+
};
|
|
3074
|
+
readonly nameMissingEntity: {
|
|
3075
|
+
readonly id: "handler/name-missing-entity";
|
|
3076
|
+
readonly summary: "Entity handler names start with the entity name.";
|
|
3077
|
+
readonly fix: "Put the entity name before the colon.";
|
|
3078
|
+
};
|
|
3079
|
+
readonly verbUnknown: {
|
|
3080
|
+
readonly id: "handler/verb-unknown";
|
|
3081
|
+
readonly summary: "Entity handler names end in a standard verb.";
|
|
3082
|
+
readonly fix: "Use a standard verb or the explicit r.writeHandler / r.queryHandler form.";
|
|
3083
|
+
};
|
|
3084
|
+
readonly agentRiskNotHigh: {
|
|
3085
|
+
readonly id: "handler/agent-risk-not-high";
|
|
3086
|
+
readonly summary: "Handlers with irreversible or instruction-carrying effects declare agent.risk high.";
|
|
3087
|
+
readonly fix: 'Set agent.risk to "high".';
|
|
3088
|
+
};
|
|
3089
|
+
readonly excludeFieldsVerbUnsupported: {
|
|
3090
|
+
readonly id: "handler/exclude-fields-verb-unsupported";
|
|
3091
|
+
readonly summary: "excludeFields is used on create and update handlers only.";
|
|
3092
|
+
readonly fix: "Remove excludeFields from this handler.";
|
|
3093
|
+
};
|
|
3094
|
+
readonly excludeFieldsUnknownField: {
|
|
3095
|
+
readonly id: "handler/exclude-fields-unknown-field";
|
|
3096
|
+
readonly summary: "excludeFields names fields of the entity.";
|
|
3097
|
+
readonly fix: "Name an existing field or remove the entry.";
|
|
3098
|
+
};
|
|
3099
|
+
readonly excludeFieldsTotalsPair: {
|
|
3100
|
+
readonly id: "handler/exclude-fields-totals-pair";
|
|
3101
|
+
readonly summary: "excludeFields leaves totalsMatch pairs together.";
|
|
3102
|
+
readonly fix: "Keep both fields of the pair writable.";
|
|
3103
|
+
};
|
|
3104
|
+
readonly excludeFieldsRequiredWithoutDefault: {
|
|
3105
|
+
readonly id: "handler/exclude-fields-required-without-default";
|
|
3106
|
+
readonly summary: "excludeFields on create does not exclude required fields without a default.";
|
|
3107
|
+
readonly fix: "Give the field a default or keep it writable.";
|
|
3108
|
+
};
|
|
3109
|
+
readonly restoreWithoutSoftDelete: {
|
|
3110
|
+
readonly id: "handler/restore-without-soft-delete";
|
|
3111
|
+
readonly summary: "Restore handlers exist only for entities with softDelete.";
|
|
3112
|
+
readonly fix: "Declare softDelete: true on the entity or drop the restore verb.";
|
|
3113
|
+
};
|
|
3114
|
+
readonly crudAccessUnresolved: {
|
|
3115
|
+
readonly id: "handler/crud-access-unresolved";
|
|
3116
|
+
readonly summary: "r.crud() resolves an access rule for every verb it registers.";
|
|
3117
|
+
readonly fix: "Set write.access, read.access or verbAccess.<verb> in the r.crud options.";
|
|
3118
|
+
};
|
|
3119
|
+
readonly nameDuplicate: {
|
|
3120
|
+
readonly id: "handler/name-duplicate";
|
|
3121
|
+
readonly summary: "A handler name is registered once per feature.";
|
|
3122
|
+
readonly fix: "Use a distinct name or drop the verb from r.crud.";
|
|
3123
|
+
};
|
|
3124
|
+
readonly inlineFormIncomplete: {
|
|
3125
|
+
readonly id: "handler/inline-form-incomplete";
|
|
3126
|
+
readonly summary: "The inline handler form provides schema, handler and options.access.";
|
|
3127
|
+
readonly fix: "Pass schema, handler and options with access.";
|
|
3128
|
+
};
|
|
3129
|
+
readonly handlerAndPerformBoth: {
|
|
3130
|
+
readonly id: "handler/handler-and-perform-both";
|
|
3131
|
+
readonly summary: "A write handler sets handler or perform, not both.";
|
|
3132
|
+
readonly fix: "Keep either the free-form handler or the perform pipeline.";
|
|
3133
|
+
};
|
|
3134
|
+
}, {
|
|
3135
|
+
readonly refWithoutColon: {
|
|
3136
|
+
readonly id: "ownership/from-ref-without-colon";
|
|
3137
|
+
readonly summary: 'from() refs have the form "user:<field>" or "claim:<feature>:<key>".';
|
|
3138
|
+
readonly fix: "Add the prefix and colon to the ref.";
|
|
3139
|
+
};
|
|
3140
|
+
readonly userColumnMissing: {
|
|
3141
|
+
readonly id: "ownership/from-user-column-missing";
|
|
3142
|
+
readonly summary: "from() with a user ref names the column explicitly.";
|
|
3143
|
+
readonly fix: 'Pass a column, e.g. from("user:id", "assigneeId").';
|
|
3144
|
+
};
|
|
3145
|
+
readonly userRefUnsupported: {
|
|
3146
|
+
readonly id: "ownership/from-user-ref-unsupported";
|
|
3147
|
+
readonly summary: 'from() user refs are "user:id" or "user:tenantId".';
|
|
3148
|
+
readonly fix: "Use one of the two supported user refs.";
|
|
3149
|
+
};
|
|
3150
|
+
readonly claimRefInvalid: {
|
|
3151
|
+
readonly id: "ownership/from-claim-ref-invalid";
|
|
3152
|
+
readonly summary: 'from() claim refs are "claim:<feature>:<shortName>".';
|
|
3153
|
+
readonly fix: "Add the feature and short name to the ref.";
|
|
3154
|
+
};
|
|
3155
|
+
readonly prefixUnsupported: {
|
|
3156
|
+
readonly id: "ownership/from-prefix-unsupported";
|
|
3157
|
+
readonly summary: 'from() refs start with "user" or "claim".';
|
|
3158
|
+
readonly fix: "Use a supported prefix.";
|
|
3159
|
+
};
|
|
3160
|
+
}, {
|
|
3161
|
+
readonly nameEmpty: {
|
|
3162
|
+
readonly id: "probe/name-empty";
|
|
3163
|
+
readonly summary: "A probe name is a non-empty string.";
|
|
3164
|
+
readonly fix: "Give the probe a name.";
|
|
3165
|
+
};
|
|
3166
|
+
readonly nameNotKebab: {
|
|
3167
|
+
readonly id: "probe/name-not-kebab";
|
|
3168
|
+
readonly summary: "Probe names are kebab-case.";
|
|
3169
|
+
readonly fix: "Rename the probe to lowercase letters, digits and dashes.";
|
|
3170
|
+
};
|
|
3171
|
+
readonly scopeInvalid: {
|
|
3172
|
+
readonly id: "probe/scope-invalid";
|
|
3173
|
+
readonly summary: "Probe scope is tenant or system.";
|
|
3174
|
+
readonly fix: "Set scope to a listed value.";
|
|
3175
|
+
};
|
|
3176
|
+
readonly costInvalid: {
|
|
3177
|
+
readonly id: "probe/cost-invalid";
|
|
3178
|
+
readonly summary: "Probe cost is free or paid.";
|
|
3179
|
+
readonly fix: "Set cost to a listed value.";
|
|
3180
|
+
};
|
|
3181
|
+
readonly i18nKeyEmpty: {
|
|
3182
|
+
readonly id: "probe/i18n-key-empty";
|
|
3183
|
+
readonly summary: "Probe area and label are non-empty i18n keys.";
|
|
3184
|
+
readonly fix: "Set area and label to i18n keys.";
|
|
3185
|
+
};
|
|
3186
|
+
readonly timeoutInvalid: {
|
|
3187
|
+
readonly id: "probe/timeout-invalid";
|
|
3188
|
+
readonly summary: "Probe timeoutMs is greater than zero.";
|
|
3189
|
+
readonly fix: "Set timeoutMs above zero or omit it.";
|
|
3190
|
+
};
|
|
3191
|
+
readonly runNotFunction: {
|
|
3192
|
+
readonly id: "probe/run-not-function";
|
|
3193
|
+
readonly summary: "Probe run is a function.";
|
|
3194
|
+
readonly fix: "Pass a run function.";
|
|
3195
|
+
};
|
|
3196
|
+
readonly targetsNotFunction: {
|
|
3197
|
+
readonly id: "probe/targets-not-function";
|
|
3198
|
+
readonly summary: "Probe targets is a function when set.";
|
|
3199
|
+
readonly fix: "Pass a function or omit targets.";
|
|
3200
|
+
};
|
|
3201
|
+
readonly duplicate: {
|
|
3202
|
+
readonly id: "probe/duplicate";
|
|
3203
|
+
readonly summary: "Probe names are unique per feature.";
|
|
3204
|
+
readonly fix: "Rename one of the probes.";
|
|
3205
|
+
};
|
|
3206
|
+
}, {
|
|
3207
|
+
readonly nameEmpty: {
|
|
3208
|
+
readonly id: "role/assignable-name-empty";
|
|
3209
|
+
readonly summary: "Assignable role names are non-empty.";
|
|
3210
|
+
readonly fix: "Give the role a name.";
|
|
3211
|
+
};
|
|
3212
|
+
readonly builtIn: {
|
|
3213
|
+
readonly id: "role/assignable-built-in";
|
|
3214
|
+
readonly summary: "Assignable roles are not built-in roles.";
|
|
3215
|
+
readonly fix: "Pick a different role name.";
|
|
3216
|
+
};
|
|
3217
|
+
readonly reservedMembership: {
|
|
3218
|
+
readonly id: "role/assignable-reserved";
|
|
3219
|
+
readonly summary: "Assignable roles are not reserved platform roles.";
|
|
3220
|
+
readonly fix: "Pick a different role name.";
|
|
3221
|
+
};
|
|
3222
|
+
readonly assignableFromInvalid: {
|
|
3223
|
+
readonly id: "role/assignable-from-invalid";
|
|
3224
|
+
readonly summary: "assignableFrom is one of the allowed roles.";
|
|
3225
|
+
readonly fix: "Use a role from the list in the message.";
|
|
3226
|
+
};
|
|
3227
|
+
readonly assignableFromConflict: {
|
|
3228
|
+
readonly id: "role/assignable-from-conflict";
|
|
3229
|
+
readonly summary: "A role is declared with one assignableFrom value.";
|
|
3230
|
+
readonly fix: "Declare the same assignableFrom everywhere or declare it once.";
|
|
3231
|
+
};
|
|
3232
|
+
}, {
|
|
3233
|
+
readonly extensionSelectorPanelIdInvalid: {
|
|
3234
|
+
readonly id: "extension-selector/panel-id-invalid";
|
|
3235
|
+
readonly summary: "Extension selector panel ids are unique, non-empty and not the reserved selector id.";
|
|
3236
|
+
readonly fix: "Give each panel its own id and avoid the reserved selector panel id.";
|
|
3237
|
+
};
|
|
3238
|
+
readonly extensionSelectorScreenPanelLabel: {
|
|
3239
|
+
readonly id: "extension-selector/screen-panel-label";
|
|
3240
|
+
readonly summary: "An extension selector screen panel sets no label.";
|
|
3241
|
+
readonly fix: "Remove the label; the embedded screen carries its own title.";
|
|
3242
|
+
};
|
|
3243
|
+
readonly extensionSelectorPanelKindUnsupported: {
|
|
3244
|
+
readonly id: "extension-selector/panel-kind-unsupported";
|
|
3245
|
+
readonly summary: "Extension selector panels are of kind custom or screen.";
|
|
3246
|
+
readonly fix: 'Use a panel of kind "custom" or "screen".';
|
|
3247
|
+
};
|
|
3248
|
+
readonly navIdNotKebab: {
|
|
3249
|
+
readonly id: "nav/id-not-kebab";
|
|
3250
|
+
readonly summary: "Nav ids are kebab-case.";
|
|
3251
|
+
readonly fix: "Rename the nav id to lowercase letters, digits and dashes, starting with a letter.";
|
|
3252
|
+
};
|
|
3253
|
+
readonly navIdDuplicate: {
|
|
3254
|
+
readonly id: "nav/id-duplicate";
|
|
3255
|
+
readonly summary: "Nav ids are unique per feature.";
|
|
3256
|
+
readonly fix: "Remove the standalone r.nav() call or the screen's inline nav.";
|
|
3257
|
+
};
|
|
3258
|
+
readonly hookValidationEscapeHatch: {
|
|
3259
|
+
readonly id: "hook/validation-escape-hatch";
|
|
3260
|
+
readonly summary: "Validation hooks declare no escapeHatch.";
|
|
3261
|
+
readonly fix: "Remove escapeHatch from the validation hook.";
|
|
3262
|
+
};
|
|
3263
|
+
readonly hookEscapeHatchInvalid: {
|
|
3264
|
+
readonly id: "hook/escape-hatch-invalid";
|
|
3265
|
+
readonly summary: "A hook escapeHatch carries a valid reason and grants.";
|
|
3266
|
+
readonly fix: "Fix the escapeHatch reason or grants as the message describes.";
|
|
3267
|
+
};
|
|
3268
|
+
readonly hookAllOfUnsupportedType: {
|
|
3269
|
+
readonly id: "hook/all-of-unsupported-type";
|
|
3270
|
+
readonly summary: "Hooks with target allOf are postSave, preDelete, postDelete or postQuery.";
|
|
3271
|
+
readonly fix: "Use a supported hook type or a different target.";
|
|
3272
|
+
};
|
|
3273
|
+
readonly hookTypeUnknown: {
|
|
3274
|
+
readonly id: "hook/type-unknown";
|
|
3275
|
+
readonly summary: "Hooks use a known hook type.";
|
|
3276
|
+
readonly fix: "Use a valid hook type; preQuery hooks were removed.";
|
|
3277
|
+
};
|
|
3278
|
+
readonly useExtensionEscapeHatchInvalid: {
|
|
3279
|
+
readonly id: "extension/use-escape-hatch-invalid";
|
|
3280
|
+
readonly summary: "r.useExtension() escapeHatch carries a valid reason and grants.";
|
|
3281
|
+
readonly fix: 'Pass escapeHatch as { reason: "<explanation>" } with valid grants.';
|
|
3282
|
+
};
|
|
3283
|
+
readonly extensionSelectorDuplicate: {
|
|
3284
|
+
readonly id: "extension-selector/duplicate";
|
|
3285
|
+
readonly summary: "Each extension point has at most one selector.";
|
|
3286
|
+
readonly fix: "Declare one extensionSelector per extension.";
|
|
3287
|
+
};
|
|
3288
|
+
readonly exposesApiTwice: {
|
|
3289
|
+
readonly id: "api/exposes-called-twice";
|
|
3290
|
+
readonly summary: "An API name is exposed once per feature.";
|
|
3291
|
+
readonly fix: "Remove the duplicate r.exposesApi() call or rename it.";
|
|
3292
|
+
};
|
|
3293
|
+
readonly projectionNameNotKebab: {
|
|
3294
|
+
readonly id: "projection/name-not-kebab";
|
|
3295
|
+
readonly summary: "Projection names are kebab-case.";
|
|
3296
|
+
readonly fix: "Rename the projection to lowercase letters, digits and dashes.";
|
|
3297
|
+
};
|
|
3298
|
+
readonly projectionNameDuplicate: {
|
|
3299
|
+
readonly id: "projection/name-duplicate";
|
|
3300
|
+
readonly summary: "Projection names are unique per feature.";
|
|
3301
|
+
readonly fix: "Rename one of the projections.";
|
|
3302
|
+
};
|
|
3303
|
+
readonly multiStreamProjectionNameNotKebab: {
|
|
3304
|
+
readonly id: "projection/multi-stream-name-not-kebab";
|
|
3305
|
+
readonly summary: "Multi-stream projection names are kebab-case.";
|
|
3306
|
+
readonly fix: "Rename the projection to lowercase letters, digits and dashes.";
|
|
3307
|
+
};
|
|
3308
|
+
readonly multiStreamProjectionNameDuplicate: {
|
|
3309
|
+
readonly id: "projection/multi-stream-name-duplicate";
|
|
3310
|
+
readonly summary: "r.projection and r.multiStreamProjection share one name space per feature.";
|
|
3311
|
+
readonly fix: "Pick a unique short name.";
|
|
3312
|
+
};
|
|
3313
|
+
readonly multiStreamProjectionWithoutApply: {
|
|
3314
|
+
readonly id: "projection/multi-stream-without-apply";
|
|
3315
|
+
readonly summary: "A multi-stream projection declares at least one apply handler.";
|
|
3316
|
+
readonly fix: "Declare at least one event type the projection reacts to.";
|
|
3317
|
+
};
|
|
3318
|
+
readonly extendEntityProjectionWithoutApply: {
|
|
3319
|
+
readonly id: "projection/extend-without-apply";
|
|
3320
|
+
readonly summary: "extendEntityProjection declares at least one apply handler.";
|
|
3321
|
+
readonly fix: "Declare at least one event type to apply.";
|
|
3322
|
+
};
|
|
3323
|
+
readonly screenIdNotKebab: {
|
|
3324
|
+
readonly id: "screen/id-not-kebab";
|
|
3325
|
+
readonly summary: "Screen ids are kebab-case.";
|
|
3326
|
+
readonly fix: "Rename the screen id to lowercase letters, digits and dashes.";
|
|
3327
|
+
};
|
|
3328
|
+
readonly screenIdDuplicate: {
|
|
3329
|
+
readonly id: "screen/id-duplicate";
|
|
3330
|
+
readonly summary: "Screen ids are unique per feature.";
|
|
3331
|
+
readonly fix: "Rename one of the screens.";
|
|
3332
|
+
};
|
|
3333
|
+
readonly contentCollectionIdDuplicate: {
|
|
3334
|
+
readonly id: "content-collection/id-duplicate";
|
|
3335
|
+
readonly summary: "Content collection ids are unique per feature.";
|
|
3336
|
+
readonly fix: "Rename one of the collections.";
|
|
3337
|
+
};
|
|
3338
|
+
readonly workspaceIdNotKebab: {
|
|
3339
|
+
readonly id: "workspace/id-not-kebab";
|
|
3340
|
+
readonly summary: "Workspace ids are kebab-case.";
|
|
3341
|
+
readonly fix: "Rename the workspace id to lowercase letters, digits and dashes.";
|
|
3342
|
+
};
|
|
3343
|
+
readonly workspaceIdDuplicate: {
|
|
3344
|
+
readonly id: "workspace/id-duplicate";
|
|
3345
|
+
readonly summary: "Workspace ids are unique per feature.";
|
|
3346
|
+
readonly fix: "Rename one of the workspaces.";
|
|
3347
|
+
};
|
|
3348
|
+
readonly httpRoutePathNotAbsolute: {
|
|
3349
|
+
readonly id: "http-route/path-not-absolute";
|
|
3350
|
+
readonly summary: "HTTP route paths start with a slash.";
|
|
3351
|
+
readonly fix: 'Prefix the route path with "/".';
|
|
3352
|
+
};
|
|
3353
|
+
readonly httpRoutePathReserved: {
|
|
3354
|
+
readonly id: "http-route/path-reserved";
|
|
3355
|
+
readonly summary: "HTTP route paths stay out of the reserved /api namespace.";
|
|
3356
|
+
readonly fix: "Pick a path outside /api or use a query or write handler.";
|
|
3357
|
+
};
|
|
3358
|
+
readonly httpRouteAnonymousMissing: {
|
|
3359
|
+
readonly id: "http-route/anonymous-missing";
|
|
3360
|
+
readonly summary: "HTTP routes declare anonymous as true or false.";
|
|
3361
|
+
readonly fix: "Set anonymous: true for public routes or false for session-authenticated ones.";
|
|
3362
|
+
};
|
|
3363
|
+
readonly httpRouteRateLimitInvalid: {
|
|
3364
|
+
readonly id: "http-route/rate-limit-invalid";
|
|
3365
|
+
readonly summary: "HTTP route rateLimit has a positive integer limit and windowSeconds.";
|
|
3366
|
+
readonly fix: "Set limit and windowSeconds to positive integers.";
|
|
3367
|
+
};
|
|
3368
|
+
readonly httpRouteDuplicate: {
|
|
3369
|
+
readonly id: "http-route/duplicate";
|
|
3370
|
+
readonly summary: "HTTP routes are unique per method and path within a feature.";
|
|
3371
|
+
readonly fix: "Remove the duplicate route or change its method or path.";
|
|
3372
|
+
};
|
|
3373
|
+
readonly webSocketRoutePathPrefix: {
|
|
3374
|
+
readonly id: "websocket-route/path-prefix";
|
|
3375
|
+
readonly summary: "WebSocket route paths live under the WebSocket namespace prefix.";
|
|
3376
|
+
readonly fix: "Start the path with the prefix named in the message.";
|
|
3377
|
+
};
|
|
3378
|
+
readonly webSocketRoutePathWildcard: {
|
|
3379
|
+
readonly id: "websocket-route/path-wildcard";
|
|
3380
|
+
readonly summary: "WebSocket route paths contain no wildcard.";
|
|
3381
|
+
readonly fix: "Remove the * from the path.";
|
|
3382
|
+
};
|
|
3383
|
+
readonly webSocketRouteMaxMessageBytesInvalid: {
|
|
3384
|
+
readonly id: "websocket-route/max-message-bytes-invalid";
|
|
3385
|
+
readonly summary: "WebSocket maxMessageBytes is an integer within the allowed range.";
|
|
3386
|
+
readonly fix: "Set maxMessageBytes to an integer within the range in the message.";
|
|
3387
|
+
};
|
|
3388
|
+
readonly webSocketRouteMaxConnectionsInvalid: {
|
|
3389
|
+
readonly id: "websocket-route/max-connections-invalid";
|
|
3390
|
+
readonly summary: "WebSocket maxConnectionsPerUser is an integer within the allowed range.";
|
|
3391
|
+
readonly fix: "Set maxConnectionsPerUser to an integer within the range in the message.";
|
|
3392
|
+
};
|
|
3393
|
+
readonly webSocketRouteDuplicate: {
|
|
3394
|
+
readonly id: "websocket-route/duplicate";
|
|
3395
|
+
readonly summary: "WebSocket route paths are unique per feature.";
|
|
3396
|
+
readonly fix: "Remove the duplicate route or change its path.";
|
|
3397
|
+
};
|
|
3398
|
+
readonly storeTableNameInvalid: {
|
|
3399
|
+
readonly id: "store-table/name-invalid";
|
|
3400
|
+
readonly summary: "Store table names are valid lowercase identifiers.";
|
|
3401
|
+
readonly fix: "Use lowercase letters, digits and underscores, starting with a letter.";
|
|
3402
|
+
};
|
|
3403
|
+
readonly storeTableDuplicate: {
|
|
3404
|
+
readonly id: "store-table/duplicate";
|
|
3405
|
+
readonly summary: "Store table names are unique per feature.";
|
|
3406
|
+
readonly fix: "Rename one of the store tables.";
|
|
3407
|
+
};
|
|
3408
|
+
readonly storeTableReadPrefixReserved: {
|
|
3409
|
+
readonly id: "store-table/read-prefix-reserved";
|
|
3410
|
+
readonly summary: "Store table names do not use the read_ prefix.";
|
|
3411
|
+
readonly fix: "Pick an unprefixed name or a distinct prefix such as store_.";
|
|
3412
|
+
};
|
|
3413
|
+
readonly storeTableMetaNotUnmanaged: {
|
|
3414
|
+
readonly id: "store-table/meta-not-unmanaged";
|
|
3415
|
+
readonly summary: "r.storeTable() receives table meta with source unmanaged.";
|
|
3416
|
+
readonly fix: 'Build the meta with defineUnmanagedTable() or source: "unmanaged".';
|
|
3417
|
+
};
|
|
3418
|
+
readonly storeTableReasonMissing: {
|
|
3419
|
+
readonly id: "store-table/reason-missing";
|
|
3420
|
+
readonly summary: "r.storeTable() declares a non-empty options.reason.";
|
|
3421
|
+
readonly fix: "Add a reason justifying the audit-trail bypass or declare the data via r.entity().";
|
|
3422
|
+
};
|
|
3423
|
+
readonly treeActionsTwice: {
|
|
3424
|
+
readonly id: "tree-actions/declared-twice";
|
|
3425
|
+
readonly summary: "A feature calls r.treeActions() at most once.";
|
|
3426
|
+
readonly fix: "Merge the tree actions into a single r.treeActions() call.";
|
|
3427
|
+
};
|
|
3428
|
+
}, {
|
|
3429
|
+
readonly nameNotKebab: {
|
|
3430
|
+
readonly id: "webhook-event/name-not-kebab";
|
|
3431
|
+
readonly summary: "Webhook event names are kebab-case.";
|
|
3432
|
+
readonly fix: "Rename the event to lowercase letters, digits and dashes.";
|
|
3433
|
+
};
|
|
3434
|
+
readonly descriptionEmpty: {
|
|
3435
|
+
readonly id: "webhook-event/description-empty";
|
|
3436
|
+
readonly summary: "Webhook events carry a non-empty description sentence.";
|
|
3437
|
+
readonly fix: "Add a description.";
|
|
3438
|
+
};
|
|
3439
|
+
readonly payloadNotZodObject: {
|
|
3440
|
+
readonly id: "webhook-event/payload-not-zod-object";
|
|
3441
|
+
readonly summary: "Webhook event payloads are Zod object schemas.";
|
|
3442
|
+
readonly fix: "Pass z.object({ ... }) as payload.";
|
|
3443
|
+
};
|
|
3444
|
+
readonly versionInvalid: {
|
|
3445
|
+
readonly id: "webhook-event/version-invalid";
|
|
3446
|
+
readonly summary: "Webhook event version is a positive integer.";
|
|
3447
|
+
readonly fix: "Set version to an integer of 1 or higher.";
|
|
3448
|
+
};
|
|
3449
|
+
readonly wireNameEmpty: {
|
|
3450
|
+
readonly id: "webhook-event/wire-name-empty";
|
|
3451
|
+
readonly summary: "Webhook event wireName is a non-empty string when set.";
|
|
3452
|
+
readonly fix: "Set a wireName or omit it.";
|
|
3453
|
+
};
|
|
3454
|
+
readonly duplicate: {
|
|
3455
|
+
readonly id: "webhook-event/duplicate";
|
|
3456
|
+
readonly summary: "Webhook event names are unique per feature.";
|
|
3457
|
+
readonly fix: "Rename one of the events.";
|
|
3458
|
+
};
|
|
2889
3459
|
}];
|
|
2890
3460
|
export declare const FRAMEWORK_BOOT_RULES: readonly BootRule[];
|
|
@@ -5,6 +5,16 @@ import { BOOT_ENVIRONMENT_RULES } from "./boot-environment-rules.js";
|
|
|
5
5
|
import { CARD_META_OVERFLOW_RULES } from "./card-meta-overflow-rules.js";
|
|
6
6
|
import { CONFIG_EDIT_ACTION_RULES } from "./config-edit-action-rules.js";
|
|
7
7
|
import { CONFIG_KEY_RULES } from "./config-key-rules.js";
|
|
8
|
+
import { DEFINITION_CONFIG_EVENTS_JOBS_RULES } from "./definition-config-events-jobs-rules.js";
|
|
9
|
+
import { DEFINITION_EVENT_RULES } from "./definition-events-rules.js";
|
|
10
|
+
import { FEATURE_DEFINITION_RULES } from "./definition-feature-rules.js";
|
|
11
|
+
import { DEFINITION_FIELD_FACTORY_RULES } from "./definition-field-factories-rules.js";
|
|
12
|
+
import { DEFINITION_HANDLER_RULES } from "./definition-handlers-rules.js";
|
|
13
|
+
import { DEFINITION_OWNERSHIP_FROM_RULES } from "./definition-ownership-from-rules.js";
|
|
14
|
+
import { DEFINITION_PROBE_RULES } from "./definition-probes-rules.js";
|
|
15
|
+
import { DEFINITION_ROLE_ASSIGNMENT_RULES } from "./definition-role-assignment-rules.js";
|
|
16
|
+
import { DEFINITION_UI_EXTENSION_RULES } from "./definition-ui-extensions-rules.js";
|
|
17
|
+
import { DEFINITION_WEBHOOK_EVENT_RULES } from "./definition-webhook-events-rules.js";
|
|
8
18
|
import { DERIVED_SQL_FIELD_RULES } from "./derived-sql-fields-rules.js";
|
|
9
19
|
import { ENTITY_DECLARATION_RULES } from "./entity-declaration-rules.js";
|
|
10
20
|
import { HANDLER_ACCESS_RULES } from "./entity-handler-access-rules.js";
|
|
@@ -73,5 +83,15 @@ export const FRAMEWORK_BOOT_RULE_TABLES = [
|
|
|
73
83
|
NAV_RULES,
|
|
74
84
|
OWNERSHIP_RULES,
|
|
75
85
|
AGENT_EFFECT_RULES,
|
|
86
|
+
DEFINITION_CONFIG_EVENTS_JOBS_RULES,
|
|
87
|
+
DEFINITION_EVENT_RULES,
|
|
88
|
+
FEATURE_DEFINITION_RULES,
|
|
89
|
+
DEFINITION_FIELD_FACTORY_RULES,
|
|
90
|
+
DEFINITION_HANDLER_RULES,
|
|
91
|
+
DEFINITION_OWNERSHIP_FROM_RULES,
|
|
92
|
+
DEFINITION_PROBE_RULES,
|
|
93
|
+
DEFINITION_ROLE_ASSIGNMENT_RULES,
|
|
94
|
+
DEFINITION_UI_EXTENSION_RULES,
|
|
95
|
+
DEFINITION_WEBHOOK_EVENT_RULES,
|
|
76
96
|
];
|
|
77
97
|
export const FRAMEWORK_BOOT_RULES = FRAMEWORK_BOOT_RULE_TABLES.flatMap((table) => Object.values(table));
|