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>
105 lines
4.0 KiB
Go
105 lines
4.0 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 && amd64) || (linux && amd64) || (linux && arm64) || (linux && loong64) || (linux && ppc64le) || (linux && riscv64) || (linux && s390x) || (netbsd && amd64) || (openbsd && amd64) || (openbsd && arm64) || (windows && (amd64 || arm64))
|
|
|
|
package sqlite3
|
|
|
|
import (
|
|
"unsafe"
|
|
|
|
"modernc.org/libc"
|
|
)
|
|
|
|
// C documentation
|
|
//
|
|
// /*
|
|
// ** Add a single segment and its associated events.
|
|
// */
|
|
func _geopolyAddOneSegment(tls *libc.TLS, p uintptr, x0 TGeoCoord, y0 TGeoCoord, x1 TGeoCoord, y1 TGeoCoord, side uint8, idx uint32) {
|
|
var pEvent, pSeg uintptr
|
|
var t TGeoCoord
|
|
_, _, _ = pEvent, pSeg, t
|
|
if x0 == x1 {
|
|
return
|
|
} /* Ignore vertical segments */
|
|
if x0 > x1 {
|
|
t = x0
|
|
x0 = x1
|
|
x1 = t
|
|
t = y0
|
|
y0 = y1
|
|
y1 = t
|
|
}
|
|
pSeg = (*TGeoOverlap)(unsafe.Pointer(p)).FaSegment + uintptr((*TGeoOverlap)(unsafe.Pointer(p)).FnSegment)*48
|
|
(*TGeoOverlap)(unsafe.Pointer(p)).FnSegment = (*TGeoOverlap)(unsafe.Pointer(p)).FnSegment + 1
|
|
(*TGeoSegment)(unsafe.Pointer(pSeg)).FC = float64((y1 - y0) / (x1 - x0))
|
|
(*TGeoSegment)(unsafe.Pointer(pSeg)).FB = float64(y1) - float64(float64(x1)*(*TGeoSegment)(unsafe.Pointer(pSeg)).FC)
|
|
(*TGeoSegment)(unsafe.Pointer(pSeg)).Fy0 = y0
|
|
(*TGeoSegment)(unsafe.Pointer(pSeg)).Fside = side
|
|
(*TGeoSegment)(unsafe.Pointer(pSeg)).Fidx = idx
|
|
pEvent = (*TGeoOverlap)(unsafe.Pointer(p)).FaEvent + uintptr((*TGeoOverlap)(unsafe.Pointer(p)).FnEvent)*32
|
|
(*TGeoOverlap)(unsafe.Pointer(p)).FnEvent = (*TGeoOverlap)(unsafe.Pointer(p)).FnEvent + 1
|
|
(*TGeoEvent)(unsafe.Pointer(pEvent)).Fx = float64(x0)
|
|
(*TGeoEvent)(unsafe.Pointer(pEvent)).FeType = 0
|
|
(*TGeoEvent)(unsafe.Pointer(pEvent)).FpSeg = pSeg
|
|
pEvent = (*TGeoOverlap)(unsafe.Pointer(p)).FaEvent + uintptr((*TGeoOverlap)(unsafe.Pointer(p)).FnEvent)*32
|
|
(*TGeoOverlap)(unsafe.Pointer(p)).FnEvent = (*TGeoOverlap)(unsafe.Pointer(p)).FnEvent + 1
|
|
(*TGeoEvent)(unsafe.Pointer(pEvent)).Fx = float64(x1)
|
|
(*TGeoEvent)(unsafe.Pointer(pEvent)).FeType = int32(1)
|
|
(*TGeoEvent)(unsafe.Pointer(pEvent)).FpSeg = pSeg
|
|
}
|
|
|
|
// C documentation
|
|
//
|
|
// /*
|
|
// ** SQL Function: geopoly_xform(poly, A, B, C, D, E, F)
|
|
// **
|
|
// ** Transform and/or translate a polygon as follows:
|
|
// **
|
|
// ** x1 = A*x0 + B*y0 + E
|
|
// ** y1 = C*x0 + D*y0 + F
|
|
// **
|
|
// ** For a translation:
|
|
// **
|
|
// ** geopoly_xform(poly, 1, 0, 0, 1, x-offset, y-offset)
|
|
// **
|
|
// ** Rotate by R around the point (0,0):
|
|
// **
|
|
// ** geopoly_xform(poly, cos(R), sin(R), -sin(R), cos(R), 0, 0)
|
|
// */
|
|
func _geopolyXformFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) {
|
|
var A, B, C, D, E, F float64
|
|
var ii int32
|
|
var p uintptr
|
|
var x0, x1, y0, y1 TGeoCoord
|
|
_, _, _, _, _, _, _, _, _, _, _, _ = A, B, C, D, E, F, ii, p, x0, x1, y0, y1
|
|
p = _geopolyFuncParam(tls, context, **(**uintptr)(__ccgo_up(argv)), uintptr(0))
|
|
A = Xsqlite3_value_double(tls, **(**uintptr)(__ccgo_up(argv + 1*8)))
|
|
B = Xsqlite3_value_double(tls, **(**uintptr)(__ccgo_up(argv + 2*8)))
|
|
C = Xsqlite3_value_double(tls, **(**uintptr)(__ccgo_up(argv + 3*8)))
|
|
D = Xsqlite3_value_double(tls, **(**uintptr)(__ccgo_up(argv + 4*8)))
|
|
E = Xsqlite3_value_double(tls, **(**uintptr)(__ccgo_up(argv + 5*8)))
|
|
F = Xsqlite3_value_double(tls, **(**uintptr)(__ccgo_up(argv + 6*8)))
|
|
_ = argc
|
|
if p != 0 {
|
|
ii = 0
|
|
for {
|
|
if !(ii < (*TGeoPoly)(unsafe.Pointer(p)).FnVertex) {
|
|
break
|
|
}
|
|
x0 = **(**TGeoCoord)(__ccgo_up(p + 8 + uintptr(ii*int32(2))*4))
|
|
y0 = **(**TGeoCoord)(__ccgo_up(p + 8 + uintptr(ii*int32(2)+int32(1))*4))
|
|
x1 = float32(float64(A*float64(x0)) + float64(B*float64(y0)) + E)
|
|
y1 = float32(float64(C*float64(x0)) + float64(D*float64(y0)) + F)
|
|
**(**TGeoCoord)(__ccgo_up(p + 8 + uintptr(ii*int32(2))*4)) = x1
|
|
**(**TGeoCoord)(__ccgo_up(p + 8 + uintptr(ii*int32(2)+int32(1))*4)) = y1
|
|
goto _1
|
|
_1:
|
|
;
|
|
ii = ii + 1
|
|
}
|
|
Xsqlite3_result_blob(tls, context, p+4, int32(4)+int32(8)*(*TGeoPoly)(unsafe.Pointer(p)).FnVertex, uintptr(-libc.Int32FromInt32(1)))
|
|
Xsqlite3_free(tls, p)
|
|
}
|
|
}
|