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>
64 lines
2.5 KiB
Go
64 lines
2.5 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)
|
|
|
|
package sqlite3
|
|
|
|
import (
|
|
"modernc.org/libc"
|
|
)
|
|
|
|
// C documentation
|
|
//
|
|
// /*
|
|
// ** Function: geopoly_regular(X,Y,R,N)
|
|
// **
|
|
// ** Construct a simple, convex, regular polygon centered at X, Y
|
|
// ** with circumradius R and with N sides.
|
|
// */
|
|
func _geopolyRegularFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) {
|
|
bp := tls.Alloc(16)
|
|
defer tls.Free(16)
|
|
var n int32
|
|
var p uintptr
|
|
var r, rAngle, x, y float64
|
|
var _ /* i at bp+0 */ int32
|
|
_, _, _, _, _, _ = n, p, r, rAngle, x, y
|
|
x = Xsqlite3_value_double(tls, **(**uintptr)(__ccgo_up(argv)))
|
|
y = Xsqlite3_value_double(tls, **(**uintptr)(__ccgo_up(argv + 1*8)))
|
|
r = Xsqlite3_value_double(tls, **(**uintptr)(__ccgo_up(argv + 2*8)))
|
|
n = Xsqlite3_value_int(tls, **(**uintptr)(__ccgo_up(argv + 3*8)))
|
|
_ = argc
|
|
if n < int32(3) || r <= float64(0) {
|
|
return
|
|
}
|
|
if n > int32(1000) {
|
|
n = int32(1000)
|
|
}
|
|
p = Xsqlite3_malloc64(tls, uint64(uint64(40)+libc.Uint64FromInt32((n-int32(1))*int32(2))*uint64(4)))
|
|
if p == uintptr(0) {
|
|
Xsqlite3_result_error_nomem(tls, context)
|
|
return
|
|
}
|
|
**(**int32)(__ccgo_up(bp)) = int32(1)
|
|
**(**uint8)(__ccgo_up(p + 4)) = **(**uint8)(__ccgo_up(bp))
|
|
**(**uint8)(__ccgo_up(p + 4 + 1)) = uint8(0)
|
|
**(**uint8)(__ccgo_up(p + 4 + 2)) = libc.Uint8FromInt32(n >> int32(8) & int32(0xff))
|
|
**(**uint8)(__ccgo_up(p + 4 + 3)) = libc.Uint8FromInt32(n & int32(0xff))
|
|
**(**int32)(__ccgo_up(bp)) = 0
|
|
for {
|
|
if !(**(**int32)(__ccgo_up(bp)) < n) {
|
|
break
|
|
}
|
|
rAngle = float64(float64(libc.Float64FromFloat64(2)*libc.Float64FromFloat64(3.141592653589793))*float64(**(**int32)(__ccgo_up(bp)))) / float64(n)
|
|
**(**TGeoCoord)(__ccgo_up(p + 8 + uintptr(**(**int32)(__ccgo_up(bp))*int32(2))*4)) = float32(x - float64(r*_geopolySine(tls, rAngle-float64(libc.Float64FromFloat64(0.5)*libc.Float64FromFloat64(3.141592653589793)))))
|
|
**(**TGeoCoord)(__ccgo_up(p + 8 + uintptr(**(**int32)(__ccgo_up(bp))*int32(2)+int32(1))*4)) = float32(y + float64(r*_geopolySine(tls, rAngle)))
|
|
goto _1
|
|
_1:
|
|
;
|
|
**(**int32)(__ccgo_up(bp)) = **(**int32)(__ccgo_up(bp)) + 1
|
|
}
|
|
Xsqlite3_result_blob(tls, context, p+4, int32(4)+int32(8)*n, uintptr(-libc.Int32FromInt32(1)))
|
|
Xsqlite3_free(tls, p)
|
|
}
|