@carllee1983/dbcli 1.52.1 → 1.53.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/.cursor/rules/dbcli.mdc +7 -3
- package/.cursor/skills/dbcli/reference.md +110 -3
- package/.github/skills/dbcli/SKILL.md +7 -3
- package/.github/skills/dbcli/reference.md +110 -3
- package/CHANGELOG.md +18 -0
- package/assets/SKILL.md +7 -3
- package/assets/SKILL.zh-TW.md +5 -2
- package/assets/reference.md +110 -3
- package/assets/ui-template.html +2 -2
- package/dist/cli-runtime.mjs +12327 -20270
- package/dist/cli.mjs +4 -4
- package/dist/core.d.ts +4 -0
- package/dist/core.mjs +157 -254
- package/dist/ui-style.css +2 -2
- package/package.json +4 -4
- package/plugins/dbcli-agent/skills/dbcli/SKILL.md +7 -3
- package/plugins/dbcli-agent/skills/dbcli/reference.md +110 -3
- package/skills/dbcli/SKILL.md +7 -3
- package/skills/dbcli/reference.md +110 -3
package/dist/ui-style.css
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap")
|
|
1
|
+
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }
|
|
2
2
|
|
|
3
|
-
/*! tailwindcss v3.4.1 | MIT License | https://tailwindcss.com*/*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Inter,system-ui,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:initial}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:initial;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:initial}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}body{--tw-bg-opacity:1;background-color:rgb(248 250 252/var(--tw-bg-opacity));font-family:Inter,system-ui,sans-serif;--tw-text-opacity:1;color:rgb(30 41 59/var(--tw-text-opacity));-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}*,::backdrop,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.card{overflow:hidden;border-radius:.75rem;border-width:1px;--tw-border-opacity:1;border-color:rgb(226 232 240/var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity));--tw-shadow:0 2px 15px -3px #00000012,0 4px 6px -2px #0000000d;--tw-shadow-colored:0 2px 15px -3px var(--tw-shadow-color),0 4px 6px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s}.sticky{position:sticky}.top-0{top:0}.z-50{z-index:50}.mx-auto{margin-left:auto;margin-right:auto}.mb-1{margin-bottom:.25rem}.mb-8{margin-bottom:2rem}.mt-0{margin-top:0}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-4{margin-top:1rem}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-2{height:.5rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-\[450px\]{height:450px}.h-full{height:100%}.min-h-0{min-height:0}.min-h-screen{min-height:100vh}.w-1{width:.25rem}.w-1\.5{width:.375rem}.w-2{width:.5rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.max-w-7xl{max-width:80rem}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-8{gap:2rem}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(2rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem*var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px*var(--tw-divide-y-reverse))}.divide-slate-50>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(248 250 252/var(--tw-divide-opacity))}.overflow-x-auto{overflow-x:auto}.whitespace-nowrap{white-space:nowrap}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-l-4{border-left-width:4px}.border-amber-300{--tw-border-opacity:1;border-color:rgb(252 211 77/var(--tw-border-opacity))}.border-primary-100{--tw-border-opacity:1;border-color:rgb(219 234 254/var(--tw-border-opacity))}.border-sky-200{--tw-border-opacity:1;border-color:rgb(186 230 253/var(--tw-border-opacity))}.border-slate-100{--tw-border-opacity:1;border-color:rgb(241 245 249/var(--tw-border-opacity))}.border-slate-200{--tw-border-opacity:1;border-color:rgb(226 232 240/var(--tw-border-opacity))}.border-l-primary-500{--tw-border-opacity:1;border-left-color:rgb(59 130 246/var(--tw-border-opacity))}.bg-amber-50{--tw-bg-opacity:1;background-color:rgb(255 251 235/var(--tw-bg-opacity))}.bg-emerald-50{--tw-bg-opacity:1;background-color:rgb(236 253 245/var(--tw-bg-opacity))}.bg-emerald-500{--tw-bg-opacity:1;background-color:rgb(16 185 129/var(--tw-bg-opacity))}.bg-primary-50{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity))}.bg-primary-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity))}.bg-primary-600{--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity))}.bg-sky-50{--tw-bg-opacity:1;background-color:rgb(240 249 255/var(--tw-bg-opacity))}.bg-slate-100{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity))}.bg-slate-200{--tw-bg-opacity:1;background-color:rgb(226 232 240/var(--tw-bg-opacity))}.bg-slate-50{--tw-bg-opacity:1;background-color:rgb(248 250 252/var(--tw-bg-opacity))}.bg-slate-50\/30{background-color:#f8fafc4d}.bg-slate-50\/50{background-color:#f8fafc80}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.bg-white\/80{background-color:#fffc}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-0{padding-top:0;padding-bottom:0}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.pb-1{padding-bottom:.25rem}.text-left{text-align:left}.text-center{text-align:center}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-extrabold{font-weight:800}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.italic{font-style:italic}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.tracking-tight{letter-spacing:-.025em}.tracking-wider{letter-spacing:.05em}.tracking-widest{letter-spacing:.1em}.text-amber-600{--tw-text-opacity:1;color:rgb(217 119 6/var(--tw-text-opacity))}.text-amber-950{--tw-text-opacity:1;color:rgb(69 26 3/var(--tw-text-opacity))}.text-emerald-600{--tw-text-opacity:1;color:rgb(5 150 105/var(--tw-text-opacity))}.text-primary-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity))}.text-primary-900{--tw-text-opacity:1;color:rgb(30 58 138/var(--tw-text-opacity))}.text-sky-600{--tw-text-opacity:1;color:rgb(2 132 199/var(--tw-text-opacity))}.text-sky-950{--tw-text-opacity:1;color:rgb(8 47 73/var(--tw-text-opacity))}.text-slate-300{--tw-text-opacity:1;color:rgb(203 213 225/var(--tw-text-opacity))}.text-slate-400{--tw-text-opacity:1;color:rgb(148 163 184/var(--tw-text-opacity))}.text-slate-500{--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity))}.text-slate-600{--tw-text-opacity:1;color:rgb(71 85 105/var(--tw-text-opacity))}.text-slate-700{--tw-text-opacity:1;color:rgb(51 65 85/var(--tw-text-opacity))}.text-slate-800{--tw-text-opacity:1;color:rgb(30 41 59/var(--tw-text-opacity))}.text-slate-900{--tw-text-opacity:1;color:rgb(15 23 42/var(--tw-text-opacity))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.shadow-lg{--tw-shadow:0 10px 15px -3px #0000001a,0 4px 6px -4px #0000001a;--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.shadow-lg,.shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 2px 0 #0000000d;--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.backdrop-blur-md{--tw-backdrop-blur:blur(12px);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.hover\:bg-primary-50:hover{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity))}.hover\:bg-primary-50\/30:hover{background-color:#eff6ff4d}.hover\:text-primary-600:hover{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity))}.hover\:shadow-md:hover{--tw-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a;--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.group:hover .group-hover\:text-primary-700{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity))}@media (min-width:640px){.sm\:flex{display:flex}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (min-width:1024px){.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:p-8{padding:2rem}}
|
|
3
|
+
/*! tailwindcss v3.4.19 | MIT License | https://tailwindcss.com*/*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Inter,system-ui,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}body{--tw-bg-opacity:1;background-color:rgb(248 250 252/var(--tw-bg-opacity,1));font-family:Inter,system-ui,sans-serif;--tw-text-opacity:1;color:rgb(30 41 59/var(--tw-text-opacity,1));-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.card{overflow:hidden;border-radius:.75rem;border-width:1px;--tw-border-opacity:1;border-color:rgb(226 232 240/var(--tw-border-opacity,1));--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1));--tw-shadow:0 2px 15px -3px rgba(0,0,0,.07),0 4px 6px -2px rgba(0,0,0,.05);--tw-shadow-colored:0 2px 15px -3px var(--tw-shadow-color),0 4px 6px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s}.sticky{position:sticky}.top-0{top:0}.z-50{z-index:50}.mx-auto{margin-left:auto;margin-right:auto}.mb-1{margin-bottom:.25rem}.mb-8{margin-bottom:2rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-4{margin-top:1rem}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-2{height:.5rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-\[450px\]{height:450px}.h-full{height:100%}.min-h-0{min-height:0}.min-h-screen{min-height:100vh}.w-1\.5{width:.375rem}.w-2{width:.5rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.max-w-7xl{max-width:80rem}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-8{gap:2rem}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(2rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem*var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px*var(--tw-divide-y-reverse))}.divide-slate-50>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(248 250 252/var(--tw-divide-opacity,1))}.overflow-x-auto{overflow-x:auto}.whitespace-nowrap{white-space:nowrap}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-l-4{border-left-width:4px}.border-amber-300{--tw-border-opacity:1;border-color:rgb(252 211 77/var(--tw-border-opacity,1))}.border-primary-100{--tw-border-opacity:1;border-color:rgb(219 234 254/var(--tw-border-opacity,1))}.border-sky-200{--tw-border-opacity:1;border-color:rgb(186 230 253/var(--tw-border-opacity,1))}.border-slate-100{--tw-border-opacity:1;border-color:rgb(241 245 249/var(--tw-border-opacity,1))}.border-slate-200{--tw-border-opacity:1;border-color:rgb(226 232 240/var(--tw-border-opacity,1))}.border-l-primary-500{--tw-border-opacity:1;border-left-color:rgb(59 130 246/var(--tw-border-opacity,1))}.bg-amber-50{--tw-bg-opacity:1;background-color:rgb(255 251 235/var(--tw-bg-opacity,1))}.bg-emerald-50{--tw-bg-opacity:1;background-color:rgb(236 253 245/var(--tw-bg-opacity,1))}.bg-emerald-500{--tw-bg-opacity:1;background-color:rgb(16 185 129/var(--tw-bg-opacity,1))}.bg-primary-50{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}.bg-primary-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))}.bg-primary-600{--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity,1))}.bg-sky-50{--tw-bg-opacity:1;background-color:rgb(240 249 255/var(--tw-bg-opacity,1))}.bg-slate-100{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}.bg-slate-200{--tw-bg-opacity:1;background-color:rgb(226 232 240/var(--tw-bg-opacity,1))}.bg-slate-50{--tw-bg-opacity:1;background-color:rgb(248 250 252/var(--tw-bg-opacity,1))}.bg-slate-50\/30{background-color:rgba(248,250,252,.3)}.bg-slate-50\/50{background-color:rgba(248,250,252,.5)}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.bg-white\/80{background-color:hsla(0,0%,100%,.8)}.p-1\.5{padding:.375rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.pb-1{padding-bottom:.25rem}.text-left{text-align:left}.text-center{text-align:center}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-extrabold{font-weight:800}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.italic{font-style:italic}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.tracking-tight{letter-spacing:-.025em}.tracking-wider{letter-spacing:.05em}.tracking-widest{letter-spacing:.1em}.text-amber-600{--tw-text-opacity:1;color:rgb(217 119 6/var(--tw-text-opacity,1))}.text-amber-950{--tw-text-opacity:1;color:rgb(69 26 3/var(--tw-text-opacity,1))}.text-emerald-600{--tw-text-opacity:1;color:rgb(5 150 105/var(--tw-text-opacity,1))}.text-primary-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.text-primary-900{--tw-text-opacity:1;color:rgb(30 58 138/var(--tw-text-opacity,1))}.text-sky-600{--tw-text-opacity:1;color:rgb(2 132 199/var(--tw-text-opacity,1))}.text-sky-950{--tw-text-opacity:1;color:rgb(8 47 73/var(--tw-text-opacity,1))}.text-slate-300{--tw-text-opacity:1;color:rgb(203 213 225/var(--tw-text-opacity,1))}.text-slate-400{--tw-text-opacity:1;color:rgb(148 163 184/var(--tw-text-opacity,1))}.text-slate-500{--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity,1))}.text-slate-600{--tw-text-opacity:1;color:rgb(71 85 105/var(--tw-text-opacity,1))}.text-slate-700{--tw-text-opacity:1;color:rgb(51 65 85/var(--tw-text-opacity,1))}.text-slate-800{--tw-text-opacity:1;color:rgb(30 41 59/var(--tw-text-opacity,1))}.text-slate-900{--tw-text-opacity:1;color:rgb(15 23 42/var(--tw-text-opacity,1))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.shadow-lg,.shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.backdrop-blur-md{--tw-backdrop-blur:blur(12px);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.hover\:bg-primary-50:hover{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}.hover\:bg-primary-50\/30:hover{background-color:rgba(239,246,255,.3)}.hover\:text-primary-600:hover{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.hover\:shadow-md:hover{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.group:hover .group-hover\:text-primary-700{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity,1))}@media (min-width:640px){.sm\:flex{display:flex}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (min-width:1024px){.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:p-8{padding:2rem}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carllee1983/dbcli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.53.0",
|
|
4
4
|
"description": "Database CLI for AI agents",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
@@ -117,14 +117,14 @@
|
|
|
117
117
|
"dts-bundle-generator": "^9.5.1",
|
|
118
118
|
"eslint": "^10.4.0",
|
|
119
119
|
"happy-dom": "^20.10.6",
|
|
120
|
-
"postcss": "^8.5.
|
|
120
|
+
"postcss": "^8.5.26",
|
|
121
121
|
"prettier": "^3.8.3",
|
|
122
|
-
"tailwindcss": "3.4.
|
|
122
|
+
"tailwindcss": "3.4.19",
|
|
123
123
|
"typescript": "^5.9.3",
|
|
124
124
|
"typescript-eslint": "^8.59.4"
|
|
125
125
|
},
|
|
126
126
|
"overrides": {
|
|
127
127
|
"brace-expansion": "^5.0.9",
|
|
128
|
-
"postcss": "^8.5.
|
|
128
|
+
"postcss": "^8.5.26"
|
|
129
129
|
}
|
|
130
130
|
}
|
|
@@ -110,8 +110,8 @@ still stop where those gates require human confirmation.
|
|
|
110
110
|
term, or relationship/join intent instead of a physical table or field name, first run
|
|
111
111
|
`dbcli skill context --format json`. If it includes `semantic`, treat that reviewed
|
|
112
112
|
section as the governed vocabulary; use `dbcli semantic search <terms> --format json`
|
|
113
|
-
to look up a specific term. If
|
|
114
|
-
fall back to `blacklist` → `schema` mapping and tell the user that optional
|
|
113
|
+
to look up a specific term. If `contracts` is present, use only its approved terms and
|
|
114
|
+
their descriptive evidence policy; it never authorizes an assertion or query. If no semantic section exists or search returns no result, fall back to `blacklist` → `schema` mapping and tell the user that optional
|
|
115
115
|
`dbcli.semantic.json` can make future requests consistent. Never create, update, or
|
|
116
116
|
migrate that file without an explicit human request; semantic vocabulary never replaces
|
|
117
117
|
schema confirmation or the normal query/write safety gates.
|
|
@@ -159,6 +159,7 @@ in **How to use dbcli** still applies.
|
|
|
159
159
|
| ORM or migration work | `schema --format json` → `diff --against-orm <orm-schema>` → review error-level drift → proposals via `migrate` (dry-run) → `migration-review` task pack → `diff --against <snapshot>` after applying. |
|
|
160
160
|
| Schema design, no database yet | `design init --output ./dbcli.design.json` → edit → `design validate` → `design render --format mermaid`. With existing ORM models, reconcile via `design diff --against-orm <path>` first. |
|
|
161
161
|
| Design drift on a live database | `blacklist list` → `schema --format json` → `design diff --against-cache` → `design propose --against-cache`, then hand the plan to a human before any migration. |
|
|
162
|
+
| PR schema-change review | `blacklist list` → `impact assess --design ./dbcli.design.json --against-cache --output ./impact.json --fail-on warn`; optionally add explicit `--events ./.dbcli/proxy/events.jsonl` for advisory redacted workload table evidence (never SQL/log rendering or a blocker), then review declared findings, coverage gaps, and the optional reviewed `dbcli.data-access.json` (declared operations only; never source parsing). |
|
|
162
163
|
| PR database review | Review changed persistence paths, then propose concrete `schema` / `plan` / `dry-run` / `report` / `guide` commands per material claim. |
|
|
163
164
|
| Slow endpoint or query | `report --section perf` → task pack `analyze-table-perf` → `lint "<query>"` → `guide missing-index-for "<query>"`; use `proxy analyze` when logs exist. |
|
|
164
165
|
| Safe data backfill | `blacklist list` → `schema <object>` → count/scope query → `update … --dry-run` → read-back or snippet `--verify`. |
|
|
@@ -201,7 +202,9 @@ Guardrails:
|
|
|
201
202
|
- Durable evidence: `assert … --write-verification-artifact --verification-subject <kind:name>`;
|
|
202
203
|
inspect with `verification summary` / `list` / `show <id>`. The `verify safe-backfill` /
|
|
203
204
|
`migration` / `rollback --kind <ddl|dml>` / `constraint --check <fk|not-null|unique|custom>`
|
|
204
|
-
family runs preflight + `--after-write` checks and **never executes the write**.
|
|
205
|
+
family runs preflight + `--after-write` checks and **never executes the write**. Add
|
|
206
|
+
`--evidence-receipt <workspace-relative-path>` only after after-write for a safe provenance
|
|
207
|
+
receipt; it is never approval to execute a write. Full flags
|
|
205
208
|
and the per-command blocks are in [reference.md](reference.md#commands).
|
|
206
209
|
|
|
207
210
|
## Audit log
|
|
@@ -415,6 +418,7 @@ Full flags and edge cases: see [reference.md](reference.md#init).
|
|
|
415
418
|
| `shell` | (same as query+) | Interactive REPL. SQL engines, MongoDB, and Redis (single-line; `.no-limit on/off`). Elasticsearch opens a Kibana Dev Tools-style REPL (`<METHOD> /<path>` + optional JSON body, blank line submits). |
|
|
416
419
|
| `skill` | n/a | Generate / install AI skill docs (`--install <claude\|gemini\|antigravity\|copilot\|cursor\|codex\|windsurf>`); `skill tasks list/show/plan` for Agent Task Packs; `skill context` for an LLM prompt-context payload (for injecting into another LLM, not needed for normal operation). |
|
|
417
420
|
| `semantic` | n/a | Validate, search, inspect drift, migrate to v2, or print the optional project-root `dbcli.semantic.json`. Give its reviewed context to an external agent, but keep provider credentials, prompts, and agent context outside dbcli. `semantic draft validate --input <file|-> [--format text\|json]` validates only the explicit untrusted `QueryDraft` offline against local semantic/schema/saved-query metadata; it returns safe hashes/references/violation codes, never executes or echoes candidate SQL. Review the original draft, then invoke `explain` or `query` separately if intended. |
|
|
421
|
+
| `contract` | n/a | Validate, inspect approved context, search, or inspect drift for optional project-root `dbcli.contracts.json`. Contracts add ownership and a descriptive evidence policy to canonical semantic references; they are offline, never execute SQL, and cannot create verification or query authority. `skill context` includes only valid approved contracts. |
|
|
418
422
|
| `migrate` | admin | SQL only. **DDL; dry-run by default** — needs `--execute`. |
|
|
419
423
|
|
|
420
424
|
Use root-level `dbcli --use <name> <command>` for any command; `query`, `schema`, `list`,
|
|
@@ -38,6 +38,7 @@ never the right move.
|
|
|
38
38
|
[check](#check) ·
|
|
39
39
|
[diff](#diff) ·
|
|
40
40
|
[design](#design) ·
|
|
41
|
+
[impact assess](#impact-assess) ·
|
|
41
42
|
[snapshot](#snapshot) ·
|
|
42
43
|
[assert](#assert) ·
|
|
43
44
|
[proxy](#proxy) ·
|
|
@@ -51,12 +52,14 @@ never the right move.
|
|
|
51
52
|
[verify](#verify) ·
|
|
52
53
|
[verification](#verification) ·
|
|
53
54
|
[backfill](#backfill) ·
|
|
55
|
+
[evidence](#evidence) ·
|
|
54
56
|
[doctor](#doctor) ·
|
|
55
57
|
[completion](#completion) ·
|
|
56
58
|
[upgrade](#upgrade) ·
|
|
57
59
|
[shell](#dbcli-shell) ·
|
|
58
60
|
[migrate](#migrate) ·
|
|
59
61
|
[semantic](#semantic) ·
|
|
62
|
+
[contract](#contract) ·
|
|
60
63
|
[skill](#skill) ·
|
|
61
64
|
[skill context](#skill-context) ·
|
|
62
65
|
[skill tasks](#skill-tasks-agent-task-packs)
|
|
@@ -1189,6 +1192,7 @@ dbcli design validate [--file <path>] [--format <format>]
|
|
|
1189
1192
|
dbcli design render [--file <path>] [--format <format>]
|
|
1190
1193
|
dbcli design diff (--against-cache | --against-orm <paths>) [options]
|
|
1191
1194
|
dbcli design propose (--against-cache | --against-orm <paths>) [options]
|
|
1195
|
+
dbcli impact assess --design <path> (--against-cache | --against-orm <paths>) --output <path> [options]
|
|
1192
1196
|
```
|
|
1193
1197
|
|
|
1194
1198
|
```bash
|
|
@@ -1200,6 +1204,7 @@ dbcli design render --format mermaid
|
|
|
1200
1204
|
dbcli design diff --against-cache --format markdown
|
|
1201
1205
|
dbcli design diff --against-orm ./prisma/schema.prisma --format markdown
|
|
1202
1206
|
dbcli design propose --against-orm ./prisma/schema.prisma --format markdown
|
|
1207
|
+
dbcli impact assess --design ./dbcli.design.json --against-cache --output ./impact.json --fail-on warn
|
|
1203
1208
|
```
|
|
1204
1209
|
|
|
1205
1210
|
| Option | Applies to | Default | Meaning |
|
|
@@ -1216,6 +1221,10 @@ dbcli design propose --against-orm ./prisma/schema.prisma --format markdown
|
|
|
1216
1221
|
`diff` and `propose` require **exactly one** comparison target; passing both or
|
|
1217
1222
|
neither is an error.
|
|
1218
1223
|
|
|
1224
|
+
### impact assess
|
|
1225
|
+
|
|
1226
|
+
Writes an offline JSON or Markdown report for the known declared impact of a design change. It requires `--design`, exactly one baseline (`--against-cache` or `--against-orm`), and an explicit workspace-contained `--output`. `--format` is `json` (default) or `markdown`; `--fail-on` is `error`, `warn`, or `never` (default). The threshold changes only the successful command exit code after the report is written. The report is limited to declared/partial coverage and never claims complete coverage. It may join the optional reviewed `dbcli.data-access.json` manifest only after validating its canonical semantic references and existing workspace-relative source paths; it never reads those sources. An optional explicit `--events <path>` is bounded and streamed through a redaction-first projection that retains recent safe table metadata only. It never starts a proxy, reads a rotated log, renders SQL/literals/errors/sessions/paths, or makes the command fail solely because workload evidence is absent or advisory. It reads no database, executes no SQL, and never reads saved-query bodies.
|
|
1227
|
+
|
|
1219
1228
|
#### Artifact shape
|
|
1220
1229
|
|
|
1221
1230
|
This example validates clean (0 errors, 0 warnings):
|
|
@@ -1939,7 +1948,7 @@ Output reports: writer enabled/disabled, last write result, file-lock state, rot
|
|
|
1939
1948
|
### verify
|
|
1940
1949
|
|
|
1941
1950
|
Run a verification scenario. `verify` **runs** verification scenarios (safe-backfill,
|
|
1942
|
-
migration, rollback) and never executes writes/DDL. `verification` **inspects and manages**
|
|
1951
|
+
migration, rollback, constraint) and never executes writes/DDL. `verification` **inspects and manages**
|
|
1943
1952
|
the local result artifacts those scenarios produce under `.dbcli/verification/`.
|
|
1944
1953
|
|
|
1945
1954
|
```bash
|
|
@@ -1951,7 +1960,8 @@ dbcli verify safe-backfill \
|
|
|
1951
1960
|
--expect "value == 0"
|
|
1952
1961
|
|
|
1953
1962
|
# After-write: re-run guards, run the read-back assertion, write a v1 artifact.
|
|
1954
|
-
|
|
1963
|
+
# An optional receipt is provenance only, never approval to execute a write.
|
|
1964
|
+
dbcli verify safe-backfill ... --after-write --evidence-receipt .dbcli/evidence/verify-receipt.json
|
|
1955
1965
|
|
|
1956
1966
|
# JSON for agents.
|
|
1957
1967
|
dbcli verify safe-backfill ... --format json
|
|
@@ -1959,7 +1969,11 @@ dbcli verify safe-backfill ... --format json
|
|
|
1959
1969
|
|
|
1960
1970
|
Options: `--table` (req), `--query` (req, analyzed not executed), `--verify-query`
|
|
1961
1971
|
(req, **plain SELECT only**), `--expect` (req), `--after-write`, `--format <table|json>`,
|
|
1962
|
-
`--subject-name <name>`, `--summary <text
|
|
1972
|
+
`--subject-name <name>`, `--summary <text>`, `--evidence-receipt <workspace-relative-path>`
|
|
1973
|
+
(after-write only). A receipt is safe provenance for the already-executed verification,
|
|
1974
|
+
not approval to execute a write. Its `succeeded`/`failed` outcome remains distinct from
|
|
1975
|
+
the artifact status (`verified`, `not_verified`, `indeterminate`, or `blocked`); task-pack
|
|
1976
|
+
`planned` evidence stays plan-only.
|
|
1963
1977
|
|
|
1964
1978
|
Guard constraints (fail closed): `--verify-query` must be a **plain `SELECT`** —
|
|
1965
1979
|
`EXPLAIN`/`EXPLAIN ANALYZE`, `SHOW`, `DESCRIBE`, and data-modifying CTEs are rejected
|
|
@@ -2464,6 +2478,66 @@ dbcli migrate drop-enum status --execute --force
|
|
|
2464
2478
|
|
|
2465
2479
|
**AI agent note:** Always use dry-run first (no `--execute`) to preview generated SQL. Only add `--execute` after confirming the SQL is correct. For DROP operations, both `--execute` and `--force` are required.
|
|
2466
2480
|
|
|
2481
|
+
### evidence
|
|
2482
|
+
|
|
2483
|
+
Compose a canonical, offline **Evidence Pack** from existing verification artifacts
|
|
2484
|
+
and audit entries. This command never opens a database connection. A pack retains only
|
|
2485
|
+
safe pointers and outcome fields: it excludes SQL, targets, audit metadata, verification
|
|
2486
|
+
summaries, result data, and credentials. Claims are external statements, never dbcli
|
|
2487
|
+
verification verdicts.
|
|
2488
|
+
|
|
2489
|
+
#### `evidence compose`
|
|
2490
|
+
|
|
2491
|
+
```bash
|
|
2492
|
+
dbcli evidence compose --claims ./claims.json --verification ver_abcd --audit 1a2b \
|
|
2493
|
+
--receipt .dbcli/evidence/verify-receipt.json \
|
|
2494
|
+
--output .dbcli/evidence/review.json --format json
|
|
2495
|
+
```
|
|
2496
|
+
|
|
2497
|
+
| Flag | Purpose | Default |
|
|
2498
|
+
|---|---|---|
|
|
2499
|
+
| `--claims <file>` | Required JSON file with exactly `subject` and `claims`; every claim has an `id` and plain-language `text`. SQL-shaped text, credentials, error content, and blacklisted identifiers are rejected. | — |
|
|
2500
|
+
| `--verification <selector...>` | One or more verification artifact ids, unique prefixes, filenames, or in-bounds paths. | none |
|
|
2501
|
+
| `--audit <selector...>` | One or more audit ids or unique prefixes (minimum four characters) from the active connection. | none |
|
|
2502
|
+
| `--receipt <path...>` | Explicit workspace-relative receipt path(s). Receipts contribute safe provenance only; they are not execution approval. | none |
|
|
2503
|
+
| `--output <path>` | Required new JSON path under the current workspace. Existing files and paths outside the workspace are refused. | — |
|
|
2504
|
+
| `--format <json\|markdown>` | Compose receipt format printed to stdout. | `json` |
|
|
2505
|
+
|
|
2506
|
+
At least one `--verification`, `--audit`, or `--receipt` reference is required. The resulting pack
|
|
2507
|
+
contains a canonical SHA-256 integrity digest and `coverage.completeForDeclaredEvidence:
|
|
2508
|
+
true` for its explicitly selected references.
|
|
2509
|
+
|
|
2510
|
+
#### `evidence validate`
|
|
2511
|
+
|
|
2512
|
+
```bash
|
|
2513
|
+
dbcli evidence validate --file .dbcli/evidence/review.json --format json
|
|
2514
|
+
```
|
|
2515
|
+
|
|
2516
|
+
| Flag | Purpose | Default |
|
|
2517
|
+
|---|---|---|
|
|
2518
|
+
| `--file <path>` | Required evidence-pack JSON file. | — |
|
|
2519
|
+
| `--format <json\|markdown>` | Validation report format. | `json` |
|
|
2520
|
+
|
|
2521
|
+
Exit `0` when digest and all selected sources are valid. If a referenced audit or
|
|
2522
|
+
verification artifact later rotates, is cleared, disappears, or belongs to a different
|
|
2523
|
+
active connection, output stays parseable with `integrity: "valid"` and
|
|
2524
|
+
`references: "source-expired"`, then exits `1`.
|
|
2525
|
+
|
|
2526
|
+
#### `evidence render`
|
|
2527
|
+
|
|
2528
|
+
```bash
|
|
2529
|
+
dbcli evidence render --file .dbcli/evidence/review.json --format markdown
|
|
2530
|
+
```
|
|
2531
|
+
|
|
2532
|
+
| Flag | Purpose | Default |
|
|
2533
|
+
|---|---|---|
|
|
2534
|
+
| `--file <path>` | Required evidence-pack JSON file. | — |
|
|
2535
|
+
| `--format <json\|markdown>` | Render format. | `markdown` |
|
|
2536
|
+
|
|
2537
|
+
`render` validates the pack digest and active blacklist policy but does not resolve its
|
|
2538
|
+
original references. It is therefore available for historical review after `validate`
|
|
2539
|
+
reports `source-expired`, unless an exposed pack field is now blacklisted.
|
|
2540
|
+
|
|
2467
2541
|
### semantic
|
|
2468
2542
|
|
|
2469
2543
|
Validate or print the optional, version-controlled `dbcli.semantic.json` in the
|
|
@@ -2590,6 +2664,39 @@ limits, audit, and recovery safeguards remain in force.
|
|
|
2590
2664
|
|
|
2591
2665
|
**Permission:** n/a (local files only; no database connection).
|
|
2592
2666
|
|
|
2667
|
+
### contract
|
|
2668
|
+
|
|
2669
|
+
Inspect the optional, version-controlled `dbcli.contracts.json` without opening a
|
|
2670
|
+
database connection. A contract adds a reviewed owner and descriptive evidence policy
|
|
2671
|
+
to canonical semantic references; it is not an executable data contract, assertion,
|
|
2672
|
+
query, or verification scenario.
|
|
2673
|
+
|
|
2674
|
+
```bash
|
|
2675
|
+
dbcli contract validate --format json
|
|
2676
|
+
dbcli contract context --format json
|
|
2677
|
+
dbcli contract context --format markdown
|
|
2678
|
+
dbcli contract search customer --format json
|
|
2679
|
+
dbcli contract drift --format json
|
|
2680
|
+
```
|
|
2681
|
+
|
|
2682
|
+
The strict v1 artifact contains `version` and `contracts`. Each contract has a unique
|
|
2683
|
+
canonical `name`, `status` (`draft`, `approved`, or `deprecated`), bounded plain-text
|
|
2684
|
+
`description` and `owner`, one or more canonical semantic `subjects`, optional aliases,
|
|
2685
|
+
and an `evidencePolicy` of `none`, `receipt-required`, or `verification-required`.
|
|
2686
|
+
Subjects must remain in the existing visible semantic registry; protected identifiers,
|
|
2687
|
+
unknown keys, duplicate names or subjects, SQL-like text, credentials, and stale
|
|
2688
|
+
references fail closed without exposing protected names.
|
|
2689
|
+
|
|
2690
|
+
`contract validate` requires an explicit valid artifact. `contract context` and
|
|
2691
|
+
`contract search` return only valid approved contracts; draft and deprecated contracts
|
|
2692
|
+
remain local review artifacts. `contract drift` reports `valid`, `stale`, `invalid`, or
|
|
2693
|
+
`unavailable` evidence offline and exits non-zero except for `valid`. A missing default
|
|
2694
|
+
file is allowed by `skill context` and leaves ordinary semantic context unchanged; a
|
|
2695
|
+
present invalid file fails closed. No contract command writes a file, opens a database
|
|
2696
|
+
connection, widens a `QueryDraft`, or changes permission/blacklist behavior.
|
|
2697
|
+
|
|
2698
|
+
**Permission:** n/a (local files only; no database connection).
|
|
2699
|
+
|
|
2593
2700
|
### skill
|
|
2594
2701
|
|
|
2595
2702
|
Emit `SKILL.md` (and the companion `reference.md`) to stdout, a file, or an
|
package/skills/dbcli/SKILL.md
CHANGED
|
@@ -110,8 +110,8 @@ still stop where those gates require human confirmation.
|
|
|
110
110
|
term, or relationship/join intent instead of a physical table or field name, first run
|
|
111
111
|
`dbcli skill context --format json`. If it includes `semantic`, treat that reviewed
|
|
112
112
|
section as the governed vocabulary; use `dbcli semantic search <terms> --format json`
|
|
113
|
-
to look up a specific term. If
|
|
114
|
-
fall back to `blacklist` → `schema` mapping and tell the user that optional
|
|
113
|
+
to look up a specific term. If `contracts` is present, use only its approved terms and
|
|
114
|
+
their descriptive evidence policy; it never authorizes an assertion or query. If no semantic section exists or search returns no result, fall back to `blacklist` → `schema` mapping and tell the user that optional
|
|
115
115
|
`dbcli.semantic.json` can make future requests consistent. Never create, update, or
|
|
116
116
|
migrate that file without an explicit human request; semantic vocabulary never replaces
|
|
117
117
|
schema confirmation or the normal query/write safety gates.
|
|
@@ -159,6 +159,7 @@ in **How to use dbcli** still applies.
|
|
|
159
159
|
| ORM or migration work | `schema --format json` → `diff --against-orm <orm-schema>` → review error-level drift → proposals via `migrate` (dry-run) → `migration-review` task pack → `diff --against <snapshot>` after applying. |
|
|
160
160
|
| Schema design, no database yet | `design init --output ./dbcli.design.json` → edit → `design validate` → `design render --format mermaid`. With existing ORM models, reconcile via `design diff --against-orm <path>` first. |
|
|
161
161
|
| Design drift on a live database | `blacklist list` → `schema --format json` → `design diff --against-cache` → `design propose --against-cache`, then hand the plan to a human before any migration. |
|
|
162
|
+
| PR schema-change review | `blacklist list` → `impact assess --design ./dbcli.design.json --against-cache --output ./impact.json --fail-on warn`; optionally add explicit `--events ./.dbcli/proxy/events.jsonl` for advisory redacted workload table evidence (never SQL/log rendering or a blocker), then review declared findings, coverage gaps, and the optional reviewed `dbcli.data-access.json` (declared operations only; never source parsing). |
|
|
162
163
|
| PR database review | Review changed persistence paths, then propose concrete `schema` / `plan` / `dry-run` / `report` / `guide` commands per material claim. |
|
|
163
164
|
| Slow endpoint or query | `report --section perf` → task pack `analyze-table-perf` → `lint "<query>"` → `guide missing-index-for "<query>"`; use `proxy analyze` when logs exist. |
|
|
164
165
|
| Safe data backfill | `blacklist list` → `schema <object>` → count/scope query → `update … --dry-run` → read-back or snippet `--verify`. |
|
|
@@ -201,7 +202,9 @@ Guardrails:
|
|
|
201
202
|
- Durable evidence: `assert … --write-verification-artifact --verification-subject <kind:name>`;
|
|
202
203
|
inspect with `verification summary` / `list` / `show <id>`. The `verify safe-backfill` /
|
|
203
204
|
`migration` / `rollback --kind <ddl|dml>` / `constraint --check <fk|not-null|unique|custom>`
|
|
204
|
-
family runs preflight + `--after-write` checks and **never executes the write**.
|
|
205
|
+
family runs preflight + `--after-write` checks and **never executes the write**. Add
|
|
206
|
+
`--evidence-receipt <workspace-relative-path>` only after after-write for a safe provenance
|
|
207
|
+
receipt; it is never approval to execute a write. Full flags
|
|
205
208
|
and the per-command blocks are in [reference.md](reference.md#commands).
|
|
206
209
|
|
|
207
210
|
## Audit log
|
|
@@ -415,6 +418,7 @@ Full flags and edge cases: see [reference.md](reference.md#init).
|
|
|
415
418
|
| `shell` | (same as query+) | Interactive REPL. SQL engines, MongoDB, and Redis (single-line; `.no-limit on/off`). Elasticsearch opens a Kibana Dev Tools-style REPL (`<METHOD> /<path>` + optional JSON body, blank line submits). |
|
|
416
419
|
| `skill` | n/a | Generate / install AI skill docs (`--install <claude\|gemini\|antigravity\|copilot\|cursor\|codex\|windsurf>`); `skill tasks list/show/plan` for Agent Task Packs; `skill context` for an LLM prompt-context payload (for injecting into another LLM, not needed for normal operation). |
|
|
417
420
|
| `semantic` | n/a | Validate, search, inspect drift, migrate to v2, or print the optional project-root `dbcli.semantic.json`. Give its reviewed context to an external agent, but keep provider credentials, prompts, and agent context outside dbcli. `semantic draft validate --input <file|-> [--format text\|json]` validates only the explicit untrusted `QueryDraft` offline against local semantic/schema/saved-query metadata; it returns safe hashes/references/violation codes, never executes or echoes candidate SQL. Review the original draft, then invoke `explain` or `query` separately if intended. |
|
|
421
|
+
| `contract` | n/a | Validate, inspect approved context, search, or inspect drift for optional project-root `dbcli.contracts.json`. Contracts add ownership and a descriptive evidence policy to canonical semantic references; they are offline, never execute SQL, and cannot create verification or query authority. `skill context` includes only valid approved contracts. |
|
|
418
422
|
| `migrate` | admin | SQL only. **DDL; dry-run by default** — needs `--execute`. |
|
|
419
423
|
|
|
420
424
|
Use root-level `dbcli --use <name> <command>` for any command; `query`, `schema`, `list`,
|
|
@@ -38,6 +38,7 @@ never the right move.
|
|
|
38
38
|
[check](#check) ·
|
|
39
39
|
[diff](#diff) ·
|
|
40
40
|
[design](#design) ·
|
|
41
|
+
[impact assess](#impact-assess) ·
|
|
41
42
|
[snapshot](#snapshot) ·
|
|
42
43
|
[assert](#assert) ·
|
|
43
44
|
[proxy](#proxy) ·
|
|
@@ -51,12 +52,14 @@ never the right move.
|
|
|
51
52
|
[verify](#verify) ·
|
|
52
53
|
[verification](#verification) ·
|
|
53
54
|
[backfill](#backfill) ·
|
|
55
|
+
[evidence](#evidence) ·
|
|
54
56
|
[doctor](#doctor) ·
|
|
55
57
|
[completion](#completion) ·
|
|
56
58
|
[upgrade](#upgrade) ·
|
|
57
59
|
[shell](#dbcli-shell) ·
|
|
58
60
|
[migrate](#migrate) ·
|
|
59
61
|
[semantic](#semantic) ·
|
|
62
|
+
[contract](#contract) ·
|
|
60
63
|
[skill](#skill) ·
|
|
61
64
|
[skill context](#skill-context) ·
|
|
62
65
|
[skill tasks](#skill-tasks-agent-task-packs)
|
|
@@ -1189,6 +1192,7 @@ dbcli design validate [--file <path>] [--format <format>]
|
|
|
1189
1192
|
dbcli design render [--file <path>] [--format <format>]
|
|
1190
1193
|
dbcli design diff (--against-cache | --against-orm <paths>) [options]
|
|
1191
1194
|
dbcli design propose (--against-cache | --against-orm <paths>) [options]
|
|
1195
|
+
dbcli impact assess --design <path> (--against-cache | --against-orm <paths>) --output <path> [options]
|
|
1192
1196
|
```
|
|
1193
1197
|
|
|
1194
1198
|
```bash
|
|
@@ -1200,6 +1204,7 @@ dbcli design render --format mermaid
|
|
|
1200
1204
|
dbcli design diff --against-cache --format markdown
|
|
1201
1205
|
dbcli design diff --against-orm ./prisma/schema.prisma --format markdown
|
|
1202
1206
|
dbcli design propose --against-orm ./prisma/schema.prisma --format markdown
|
|
1207
|
+
dbcli impact assess --design ./dbcli.design.json --against-cache --output ./impact.json --fail-on warn
|
|
1203
1208
|
```
|
|
1204
1209
|
|
|
1205
1210
|
| Option | Applies to | Default | Meaning |
|
|
@@ -1216,6 +1221,10 @@ dbcli design propose --against-orm ./prisma/schema.prisma --format markdown
|
|
|
1216
1221
|
`diff` and `propose` require **exactly one** comparison target; passing both or
|
|
1217
1222
|
neither is an error.
|
|
1218
1223
|
|
|
1224
|
+
### impact assess
|
|
1225
|
+
|
|
1226
|
+
Writes an offline JSON or Markdown report for the known declared impact of a design change. It requires `--design`, exactly one baseline (`--against-cache` or `--against-orm`), and an explicit workspace-contained `--output`. `--format` is `json` (default) or `markdown`; `--fail-on` is `error`, `warn`, or `never` (default). The threshold changes only the successful command exit code after the report is written. The report is limited to declared/partial coverage and never claims complete coverage. It may join the optional reviewed `dbcli.data-access.json` manifest only after validating its canonical semantic references and existing workspace-relative source paths; it never reads those sources. An optional explicit `--events <path>` is bounded and streamed through a redaction-first projection that retains recent safe table metadata only. It never starts a proxy, reads a rotated log, renders SQL/literals/errors/sessions/paths, or makes the command fail solely because workload evidence is absent or advisory. It reads no database, executes no SQL, and never reads saved-query bodies.
|
|
1227
|
+
|
|
1219
1228
|
#### Artifact shape
|
|
1220
1229
|
|
|
1221
1230
|
This example validates clean (0 errors, 0 warnings):
|
|
@@ -1939,7 +1948,7 @@ Output reports: writer enabled/disabled, last write result, file-lock state, rot
|
|
|
1939
1948
|
### verify
|
|
1940
1949
|
|
|
1941
1950
|
Run a verification scenario. `verify` **runs** verification scenarios (safe-backfill,
|
|
1942
|
-
migration, rollback) and never executes writes/DDL. `verification` **inspects and manages**
|
|
1951
|
+
migration, rollback, constraint) and never executes writes/DDL. `verification` **inspects and manages**
|
|
1943
1952
|
the local result artifacts those scenarios produce under `.dbcli/verification/`.
|
|
1944
1953
|
|
|
1945
1954
|
```bash
|
|
@@ -1951,7 +1960,8 @@ dbcli verify safe-backfill \
|
|
|
1951
1960
|
--expect "value == 0"
|
|
1952
1961
|
|
|
1953
1962
|
# After-write: re-run guards, run the read-back assertion, write a v1 artifact.
|
|
1954
|
-
|
|
1963
|
+
# An optional receipt is provenance only, never approval to execute a write.
|
|
1964
|
+
dbcli verify safe-backfill ... --after-write --evidence-receipt .dbcli/evidence/verify-receipt.json
|
|
1955
1965
|
|
|
1956
1966
|
# JSON for agents.
|
|
1957
1967
|
dbcli verify safe-backfill ... --format json
|
|
@@ -1959,7 +1969,11 @@ dbcli verify safe-backfill ... --format json
|
|
|
1959
1969
|
|
|
1960
1970
|
Options: `--table` (req), `--query` (req, analyzed not executed), `--verify-query`
|
|
1961
1971
|
(req, **plain SELECT only**), `--expect` (req), `--after-write`, `--format <table|json>`,
|
|
1962
|
-
`--subject-name <name>`, `--summary <text
|
|
1972
|
+
`--subject-name <name>`, `--summary <text>`, `--evidence-receipt <workspace-relative-path>`
|
|
1973
|
+
(after-write only). A receipt is safe provenance for the already-executed verification,
|
|
1974
|
+
not approval to execute a write. Its `succeeded`/`failed` outcome remains distinct from
|
|
1975
|
+
the artifact status (`verified`, `not_verified`, `indeterminate`, or `blocked`); task-pack
|
|
1976
|
+
`planned` evidence stays plan-only.
|
|
1963
1977
|
|
|
1964
1978
|
Guard constraints (fail closed): `--verify-query` must be a **plain `SELECT`** —
|
|
1965
1979
|
`EXPLAIN`/`EXPLAIN ANALYZE`, `SHOW`, `DESCRIBE`, and data-modifying CTEs are rejected
|
|
@@ -2464,6 +2478,66 @@ dbcli migrate drop-enum status --execute --force
|
|
|
2464
2478
|
|
|
2465
2479
|
**AI agent note:** Always use dry-run first (no `--execute`) to preview generated SQL. Only add `--execute` after confirming the SQL is correct. For DROP operations, both `--execute` and `--force` are required.
|
|
2466
2480
|
|
|
2481
|
+
### evidence
|
|
2482
|
+
|
|
2483
|
+
Compose a canonical, offline **Evidence Pack** from existing verification artifacts
|
|
2484
|
+
and audit entries. This command never opens a database connection. A pack retains only
|
|
2485
|
+
safe pointers and outcome fields: it excludes SQL, targets, audit metadata, verification
|
|
2486
|
+
summaries, result data, and credentials. Claims are external statements, never dbcli
|
|
2487
|
+
verification verdicts.
|
|
2488
|
+
|
|
2489
|
+
#### `evidence compose`
|
|
2490
|
+
|
|
2491
|
+
```bash
|
|
2492
|
+
dbcli evidence compose --claims ./claims.json --verification ver_abcd --audit 1a2b \
|
|
2493
|
+
--receipt .dbcli/evidence/verify-receipt.json \
|
|
2494
|
+
--output .dbcli/evidence/review.json --format json
|
|
2495
|
+
```
|
|
2496
|
+
|
|
2497
|
+
| Flag | Purpose | Default |
|
|
2498
|
+
|---|---|---|
|
|
2499
|
+
| `--claims <file>` | Required JSON file with exactly `subject` and `claims`; every claim has an `id` and plain-language `text`. SQL-shaped text, credentials, error content, and blacklisted identifiers are rejected. | — |
|
|
2500
|
+
| `--verification <selector...>` | One or more verification artifact ids, unique prefixes, filenames, or in-bounds paths. | none |
|
|
2501
|
+
| `--audit <selector...>` | One or more audit ids or unique prefixes (minimum four characters) from the active connection. | none |
|
|
2502
|
+
| `--receipt <path...>` | Explicit workspace-relative receipt path(s). Receipts contribute safe provenance only; they are not execution approval. | none |
|
|
2503
|
+
| `--output <path>` | Required new JSON path under the current workspace. Existing files and paths outside the workspace are refused. | — |
|
|
2504
|
+
| `--format <json\|markdown>` | Compose receipt format printed to stdout. | `json` |
|
|
2505
|
+
|
|
2506
|
+
At least one `--verification`, `--audit`, or `--receipt` reference is required. The resulting pack
|
|
2507
|
+
contains a canonical SHA-256 integrity digest and `coverage.completeForDeclaredEvidence:
|
|
2508
|
+
true` for its explicitly selected references.
|
|
2509
|
+
|
|
2510
|
+
#### `evidence validate`
|
|
2511
|
+
|
|
2512
|
+
```bash
|
|
2513
|
+
dbcli evidence validate --file .dbcli/evidence/review.json --format json
|
|
2514
|
+
```
|
|
2515
|
+
|
|
2516
|
+
| Flag | Purpose | Default |
|
|
2517
|
+
|---|---|---|
|
|
2518
|
+
| `--file <path>` | Required evidence-pack JSON file. | — |
|
|
2519
|
+
| `--format <json\|markdown>` | Validation report format. | `json` |
|
|
2520
|
+
|
|
2521
|
+
Exit `0` when digest and all selected sources are valid. If a referenced audit or
|
|
2522
|
+
verification artifact later rotates, is cleared, disappears, or belongs to a different
|
|
2523
|
+
active connection, output stays parseable with `integrity: "valid"` and
|
|
2524
|
+
`references: "source-expired"`, then exits `1`.
|
|
2525
|
+
|
|
2526
|
+
#### `evidence render`
|
|
2527
|
+
|
|
2528
|
+
```bash
|
|
2529
|
+
dbcli evidence render --file .dbcli/evidence/review.json --format markdown
|
|
2530
|
+
```
|
|
2531
|
+
|
|
2532
|
+
| Flag | Purpose | Default |
|
|
2533
|
+
|---|---|---|
|
|
2534
|
+
| `--file <path>` | Required evidence-pack JSON file. | — |
|
|
2535
|
+
| `--format <json\|markdown>` | Render format. | `markdown` |
|
|
2536
|
+
|
|
2537
|
+
`render` validates the pack digest and active blacklist policy but does not resolve its
|
|
2538
|
+
original references. It is therefore available for historical review after `validate`
|
|
2539
|
+
reports `source-expired`, unless an exposed pack field is now blacklisted.
|
|
2540
|
+
|
|
2467
2541
|
### semantic
|
|
2468
2542
|
|
|
2469
2543
|
Validate or print the optional, version-controlled `dbcli.semantic.json` in the
|
|
@@ -2590,6 +2664,39 @@ limits, audit, and recovery safeguards remain in force.
|
|
|
2590
2664
|
|
|
2591
2665
|
**Permission:** n/a (local files only; no database connection).
|
|
2592
2666
|
|
|
2667
|
+
### contract
|
|
2668
|
+
|
|
2669
|
+
Inspect the optional, version-controlled `dbcli.contracts.json` without opening a
|
|
2670
|
+
database connection. A contract adds a reviewed owner and descriptive evidence policy
|
|
2671
|
+
to canonical semantic references; it is not an executable data contract, assertion,
|
|
2672
|
+
query, or verification scenario.
|
|
2673
|
+
|
|
2674
|
+
```bash
|
|
2675
|
+
dbcli contract validate --format json
|
|
2676
|
+
dbcli contract context --format json
|
|
2677
|
+
dbcli contract context --format markdown
|
|
2678
|
+
dbcli contract search customer --format json
|
|
2679
|
+
dbcli contract drift --format json
|
|
2680
|
+
```
|
|
2681
|
+
|
|
2682
|
+
The strict v1 artifact contains `version` and `contracts`. Each contract has a unique
|
|
2683
|
+
canonical `name`, `status` (`draft`, `approved`, or `deprecated`), bounded plain-text
|
|
2684
|
+
`description` and `owner`, one or more canonical semantic `subjects`, optional aliases,
|
|
2685
|
+
and an `evidencePolicy` of `none`, `receipt-required`, or `verification-required`.
|
|
2686
|
+
Subjects must remain in the existing visible semantic registry; protected identifiers,
|
|
2687
|
+
unknown keys, duplicate names or subjects, SQL-like text, credentials, and stale
|
|
2688
|
+
references fail closed without exposing protected names.
|
|
2689
|
+
|
|
2690
|
+
`contract validate` requires an explicit valid artifact. `contract context` and
|
|
2691
|
+
`contract search` return only valid approved contracts; draft and deprecated contracts
|
|
2692
|
+
remain local review artifacts. `contract drift` reports `valid`, `stale`, `invalid`, or
|
|
2693
|
+
`unavailable` evidence offline and exits non-zero except for `valid`. A missing default
|
|
2694
|
+
file is allowed by `skill context` and leaves ordinary semantic context unchanged; a
|
|
2695
|
+
present invalid file fails closed. No contract command writes a file, opens a database
|
|
2696
|
+
connection, widens a `QueryDraft`, or changes permission/blacklist behavior.
|
|
2697
|
+
|
|
2698
|
+
**Permission:** n/a (local files only; no database connection).
|
|
2699
|
+
|
|
2593
2700
|
### skill
|
|
2594
2701
|
|
|
2595
2702
|
Emit `SKILL.md` (and the companion `reference.md`) to stdout, a file, or an
|