6c92f85d10
Bring the Nexus/Praxis/Hexis integration in line with MAVEN_ECOSYSTEM_ARCHITECTURE.md: - Praxis over HTTP: drop the in-process praxis.db open (praxisstore/ praxistools) and call praxisd's /api/v1/tools/* API via a new praxisClient. Honors the "no component reads another's DB" invariant (AC#12). PraxisConfig.DBPath -> URL. - Hexis confirmation gate: mutating capabilities (ReadOnly=false) now park a bound pendingHexis confirmation and require a spoken "да" before executing; read-only run immediately (AC#7, no auto attention->action). - Capability safety: >1 verb match is ambiguous -> ask instead of firing the first; ambiguous Nexus resolution asks for clarification (AC#2). - Correlation IDs on Hexis execute, recorded in the cross-service trace. - Bug: importance arrives as JSON float64 over HTTP, not int. - Tests: confirm-gate, decline, read-only, and ambiguity paths. Build: vendor/ bakes in the hexis client (replace-directed at a sibling repo outside the Docker context); Dockerfile builds from vendor and no longer `go mod download`s the unreachable replace paths. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
123 lines
4.3 KiB
Go
123 lines
4.3 KiB
Go
// Code generated by modernc.org/undup from the per-target sqlite_*.go files; DO NOT EDIT.
|
|
|
|
//go:build (darwin && amd64) || (darwin && arm64) || (freebsd && 386) || (freebsd && amd64) || (freebsd && arm) || (linux && 386) || (linux && amd64) || (linux && arm) || (linux && arm64) || (linux && loong64) || (linux && ppc64le) || (linux && riscv64) || (linux && s390x) || (netbsd && amd64) || (openbsd && amd64) || (openbsd && arm64)
|
|
|
|
package sqlite3
|
|
|
|
import (
|
|
"unsafe"
|
|
|
|
"modernc.org/libc"
|
|
)
|
|
|
|
func _cellOverlap(tls *libc.TLS, pRtree uintptr, p uintptr, aCell uintptr, nCell int32) (r TRtreeDValue) {
|
|
var ii, jj int32
|
|
var o, overlap, x1, x2 TRtreeDValue
|
|
var v3, v4, v5, v6, v7 float64
|
|
_, _, _, _, _, _, _, _, _, _, _ = ii, jj, o, overlap, x1, x2, v3, v4, v5, v6, v7
|
|
overlap = float64(0)
|
|
ii = 0
|
|
for {
|
|
if !(ii < nCell) {
|
|
break
|
|
}
|
|
o = libc.Float64FromInt32(1)
|
|
jj = 0
|
|
for {
|
|
if !(jj < libc.Int32FromUint8((*TRtree)(unsafe.Pointer(pRtree)).FnDim2)) {
|
|
break
|
|
}
|
|
if libc.Int32FromUint8((*TRtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_REAL32 {
|
|
v4 = float64(*(*TRtreeValue)(unsafe.Pointer(p + 8 + uintptr(jj)*4)))
|
|
} else {
|
|
v4 = float64(*(*int32)(unsafe.Pointer(p + 8 + uintptr(jj)*4)))
|
|
}
|
|
if libc.Int32FromUint8((*TRtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_REAL32 {
|
|
v5 = float64(*(*TRtreeValue)(unsafe.Pointer(aCell + uintptr(ii)*48 + 8 + uintptr(jj)*4)))
|
|
} else {
|
|
v5 = float64(*(*int32)(unsafe.Pointer(aCell + uintptr(ii)*48 + 8 + uintptr(jj)*4)))
|
|
}
|
|
if v4 > v5 {
|
|
if libc.Int32FromUint8((*TRtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_REAL32 {
|
|
v6 = float64(*(*TRtreeValue)(unsafe.Pointer(p + 8 + uintptr(jj)*4)))
|
|
} else {
|
|
v6 = float64(*(*int32)(unsafe.Pointer(p + 8 + uintptr(jj)*4)))
|
|
}
|
|
v3 = v6
|
|
} else {
|
|
if libc.Int32FromUint8((*TRtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_REAL32 {
|
|
v7 = float64(*(*TRtreeValue)(unsafe.Pointer(aCell + uintptr(ii)*48 + 8 + uintptr(jj)*4)))
|
|
} else {
|
|
v7 = float64(*(*int32)(unsafe.Pointer(aCell + uintptr(ii)*48 + 8 + uintptr(jj)*4)))
|
|
}
|
|
v3 = v7
|
|
}
|
|
x1 = v3
|
|
if libc.Int32FromUint8((*TRtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_REAL32 {
|
|
v4 = float64(*(*TRtreeValue)(unsafe.Pointer(p + 8 + uintptr(jj+int32(1))*4)))
|
|
} else {
|
|
v4 = float64(*(*int32)(unsafe.Pointer(p + 8 + uintptr(jj+int32(1))*4)))
|
|
}
|
|
if libc.Int32FromUint8((*TRtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_REAL32 {
|
|
v5 = float64(*(*TRtreeValue)(unsafe.Pointer(aCell + uintptr(ii)*48 + 8 + uintptr(jj+int32(1))*4)))
|
|
} else {
|
|
v5 = float64(*(*int32)(unsafe.Pointer(aCell + uintptr(ii)*48 + 8 + uintptr(jj+int32(1))*4)))
|
|
}
|
|
if v4 < v5 {
|
|
if libc.Int32FromUint8((*TRtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_REAL32 {
|
|
v6 = float64(*(*TRtreeValue)(unsafe.Pointer(p + 8 + uintptr(jj+int32(1))*4)))
|
|
} else {
|
|
v6 = float64(*(*int32)(unsafe.Pointer(p + 8 + uintptr(jj+int32(1))*4)))
|
|
}
|
|
v3 = v6
|
|
} else {
|
|
if libc.Int32FromUint8((*TRtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_REAL32 {
|
|
v7 = float64(*(*TRtreeValue)(unsafe.Pointer(aCell + uintptr(ii)*48 + 8 + uintptr(jj+int32(1))*4)))
|
|
} else {
|
|
v7 = float64(*(*int32)(unsafe.Pointer(aCell + uintptr(ii)*48 + 8 + uintptr(jj+int32(1))*4)))
|
|
}
|
|
v3 = v7
|
|
}
|
|
x2 = v3
|
|
if x2 < x1 {
|
|
o = libc.Float64FromInt32(0)
|
|
break
|
|
} else {
|
|
o = TRtreeDValue(o * (x2 - x1))
|
|
}
|
|
goto _2
|
|
_2:
|
|
;
|
|
jj = jj + int32(2)
|
|
}
|
|
overlap = overlap + o
|
|
goto _1
|
|
_1:
|
|
;
|
|
ii = ii + 1
|
|
}
|
|
return overlap
|
|
}
|
|
|
|
// C documentation
|
|
//
|
|
// /*
|
|
// ** Expression p should encode a floating point value between 1.0 and 0.0.
|
|
// ** Return 134,217,728 (2^27) times this value. Or return -1 if p is not
|
|
// ** a floating point value between 1.0 and 0.0.
|
|
// */
|
|
func _exprProbability(tls *libc.TLS, p uintptr) (r int32) {
|
|
bp := tls.Alloc(16)
|
|
defer tls.Free(16)
|
|
var _ /* r at bp+0 */ float64
|
|
**(**float64)(__ccgo_up(bp)) = -libc.Float64FromFloat64(1)
|
|
if libc.Int32FromUint8((*TExpr)(unsafe.Pointer(p)).Fop) != int32(TK_FLOAT) {
|
|
return -int32(1)
|
|
}
|
|
_sqlite3AtoF(tls, *(*uintptr)(unsafe.Pointer(p + 8)), bp)
|
|
if **(**float64)(__ccgo_up(bp)) > float64(1) {
|
|
return -int32(1)
|
|
}
|
|
return int32(float64(**(**float64)(__ccgo_up(bp)) * libc.Float64FromFloat64(1.34217728e+08)))
|
|
}
|