Versions in this module Expand all Collapse all v0 v0.1.0 Aug 13, 2026 Changes in this version + const ArtifactMagic + const ArtifactVersion + const MaxArtifactPayloadSize + var ErrCorrupt = errors.New("artifact integrity checksum mismatch or corrupted payload") + var ErrInvalidMagic = errors.New("invalid artifact magic identifier") + var ErrInvalidProgram = errors.New("structurally invalid bytecode program") + var ErrOversized = errors.New("artifact payload exceeds trusted maximum size") + var ErrTruncated = errors.New("truncated artifact") + var ErrUnsupportedVer = errors.New("unsupported artifact version") + var Registry = map[Opcode]OpcodeSpec + func ValidateProgram(prog *BCProgram) error + func WriteArtifact(w io.Writer, prog *BCProgram) error + type BCCompiler struct + type BCFunction struct + Docstring string + Instructions []BCInstruction + LazySynthesize bool + Name string + Params []string + type BCInstruction struct + IntOperand int64 + IntOperand2 int64 + IntOperand3 int64 + Op Opcode + OpString string + StringOperand string + StringOperand2 string + StringOperand3 string + ValueOperand any + func (inst *BCInstruction) UnmarshalJSON(data []byte) error + type BCProgram struct + Functions map[string]*BCFunction + Main []BCInstruction + Version int + func CompileToBytecode(ast *ast.Node) *BCProgram + func ReadArtifact(r io.Reader) (*BCProgram, error) + type Opcode uint16 + const OpAchieve + const OpAppend + const OpBinop + const OpCall + const OpCliArgs + const OpCliArgsGet + const OpConfidence + const OpConvert + const OpDbConnect + const OpEnv + const OpEphemeralCircuit + const OpExec + const OpExit + const OpFetch + const OpForInit + const OpForNext + const OpHttpRoute + const OpHttpServerServe + const OpHttpServerStart + const OpIsNil + const OpJump + const OpJumpIfFalse + const OpListGet + const OpListLen + const OpLlmGenerate + const OpLoadConst + const OpLoadVar + const OpMakeDict + const OpMakeList + const OpMapDelete + const OpMapGet + const OpMapSet + const OpMkdir + const OpNeuralCircuit + const OpParseJson + const OpPrint + const OpReadFile + const OpReadLine + const OpRegexMatch + const OpRes + const OpResJson + const OpReturn + const OpSetVar + const OpSleep + const OpSpawn + const OpSpawnAgent + const OpSqlQuery + const OpStderr + const OpStoreDelete + const OpStoreGet + const OpStoreOpen + const OpStorePut + const OpStoreVar + const OpStrJoin + const OpStrSplit + const OpTask + const OpTryLet + const OpUnknown + const OpWriteFile + func NameToOpcode(name string) (Opcode, bool) + type OpcodeSpec struct + Capability capability.Capability + Code Opcode + Description string + Name string + Operands []OperandType + Pops int + Pushes int + type OperandType string + const OperandInt + const OperandString + const OperandValue