Defines the host<->guest wire contract for the .so -> wazero migration as a repo-local buf module (abi/proto/v1, generated Go in abi/v1): - manifest.proto: PluginManifest mirroring every static field of plugin.PluginRegistration (abi_version, deps, block/template registrations, admin pages, settings schema, theme presets, fonts, master pages, AI actions, RBAC method roles, CSS manifest, icon packs, directory extensions, job types, RAG fetcher types, settings panel, hook flags, core service bindings) - invoke.proto: bn_invoke envelope, Hook catalog (RENDER_BLOCK, RENDER_TEMPLATE, HANDLE_HTTP, JOB, LOAD, UNLOAD, RAG_FETCH, MEDIA_HOOK, DESCRIBE), AbiError, and job/lifecycle/rag/media/describe payloads - render.proto: RenderBlock/RenderTemplate payloads + RenderContext enumerating every ctx value from blocks/context.go (incl. BlockContext 1:1) - http.proto: buffered HttpRequest/HttpResponse for HANDLE_HTTP - db.proto: guest sql-driver messages (DbValue oneof over pgx-mappable types, query/exec/tx with host-side tx handles, SQLSTATE-carrying DbError) - capability.proto: HostCall envelope + one request/response pair per CoreServices interface method (content, settings+update, gating, crypto, menus, datasources, users, subscriptions, media.deposit, email.send, ai.text_call, ai.tools.register, bridge, jobs.submit, embeddings, rag, reviews, badges.refresh) The abi/ buf module is deliberately separate from the repo-root config: proto/ is the shared block/proto submodule (service API contracts); the ABI is SDK-internal and versions in lockstep with the guest shim. New `make abi` target runs buf lint + generate. docs/wasm-abi.md documents the ptr+len calling convention (bn_alloc, bn_invoke, packed u64), hook catalog, error semantics, abi_version evolution rules, and the full registration/ CoreServices coverage tables. Verified: `cd abi && buf lint` exit 0; `go build ./...` exit 0. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1386 lines
41 KiB
Go
1386 lines
41 KiB
Go
// invoke.proto — the bn_invoke envelope, hook catalog, and the job/lifecycle
|
|
// hook payloads (WO-WZ-001).
|
|
//
|
|
// Every host→guest call crosses the wasm boundary as one guest export:
|
|
//
|
|
// bn_invoke(hook_id, ptr, len) → packed(ptr, len)
|
|
//
|
|
// where (ptr, len) frames a serialized InvokeRequest and the packed return
|
|
// frames a serialized InvokeResponse. Hook-specific payloads (render.proto,
|
|
// http.proto, and the messages below) travel inside InvokeRequest.payload /
|
|
// InvokeResponse.payload. See core/docs/wasm-abi.md.
|
|
|
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// versions:
|
|
// protoc-gen-go v1.36.11
|
|
// protoc (unknown)
|
|
// source: v1/invoke.proto
|
|
|
|
package abiv1
|
|
|
|
import (
|
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
|
reflect "reflect"
|
|
sync "sync"
|
|
unsafe "unsafe"
|
|
)
|
|
|
|
const (
|
|
// Verify that this generated code is sufficiently up-to-date.
|
|
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
|
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
|
)
|
|
|
|
// Hook identifies the guest entry point being invoked.
|
|
type Hook int32
|
|
|
|
const (
|
|
Hook_HOOK_UNSPECIFIED Hook = 0
|
|
// Render one block: payload = RenderBlockRequest / RenderBlockResponse.
|
|
Hook_HOOK_RENDER_BLOCK Hook = 1
|
|
// Render one template: payload = RenderTemplateRequest / RenderTemplateResponse.
|
|
Hook_HOOK_RENDER_TEMPLATE Hook = 2
|
|
// Forward a buffered HTTP request to the guest's mux:
|
|
// payload = HttpRequest / HttpResponse.
|
|
Hook_HOOK_HANDLE_HTTP Hook = 3
|
|
// Run a background job handler: payload = JobRequest / JobResponse.
|
|
Hook_HOOK_JOB Hook = 4
|
|
// Plugin load lifecycle: payload = LoadRequest / LoadResponse.
|
|
Hook_HOOK_LOAD Hook = 5
|
|
// Plugin unload lifecycle: payload = UnloadRequest / UnloadResponse.
|
|
Hook_HOOK_UNLOAD Hook = 6
|
|
// Re-fetch content for RAG re-indexing:
|
|
// payload = RagFetchRequest / RagFetchResponse.
|
|
Hook_HOOK_RAG_FETCH Hook = 7
|
|
// Media lifecycle event delivery: payload = MediaHookRequest / MediaHookResponse.
|
|
Hook_HOOK_MEDIA_HOOK Hook = 8
|
|
// Capture the static manifest at publish time:
|
|
// payload = DescribeRequest / DescribeResponse.
|
|
Hook_HOOK_DESCRIBE Hook = 9
|
|
)
|
|
|
|
// Enum value maps for Hook.
|
|
var (
|
|
Hook_name = map[int32]string{
|
|
0: "HOOK_UNSPECIFIED",
|
|
1: "HOOK_RENDER_BLOCK",
|
|
2: "HOOK_RENDER_TEMPLATE",
|
|
3: "HOOK_HANDLE_HTTP",
|
|
4: "HOOK_JOB",
|
|
5: "HOOK_LOAD",
|
|
6: "HOOK_UNLOAD",
|
|
7: "HOOK_RAG_FETCH",
|
|
8: "HOOK_MEDIA_HOOK",
|
|
9: "HOOK_DESCRIBE",
|
|
}
|
|
Hook_value = map[string]int32{
|
|
"HOOK_UNSPECIFIED": 0,
|
|
"HOOK_RENDER_BLOCK": 1,
|
|
"HOOK_RENDER_TEMPLATE": 2,
|
|
"HOOK_HANDLE_HTTP": 3,
|
|
"HOOK_JOB": 4,
|
|
"HOOK_LOAD": 5,
|
|
"HOOK_UNLOAD": 6,
|
|
"HOOK_RAG_FETCH": 7,
|
|
"HOOK_MEDIA_HOOK": 8,
|
|
"HOOK_DESCRIBE": 9,
|
|
}
|
|
)
|
|
|
|
func (x Hook) Enum() *Hook {
|
|
p := new(Hook)
|
|
*p = x
|
|
return p
|
|
}
|
|
|
|
func (x Hook) String() string {
|
|
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
|
}
|
|
|
|
func (Hook) Descriptor() protoreflect.EnumDescriptor {
|
|
return file_v1_invoke_proto_enumTypes[0].Descriptor()
|
|
}
|
|
|
|
func (Hook) Type() protoreflect.EnumType {
|
|
return &file_v1_invoke_proto_enumTypes[0]
|
|
}
|
|
|
|
func (x Hook) Number() protoreflect.EnumNumber {
|
|
return protoreflect.EnumNumber(x)
|
|
}
|
|
|
|
// Deprecated: Use Hook.Descriptor instead.
|
|
func (Hook) EnumDescriptor() ([]byte, []int) {
|
|
return file_v1_invoke_proto_rawDescGZIP(), []int{0}
|
|
}
|
|
|
|
// AbiErrorCode classifies boundary-crossing failures.
|
|
type AbiErrorCode int32
|
|
|
|
const (
|
|
AbiErrorCode_ABI_ERROR_CODE_UNSPECIFIED AbiErrorCode = 0
|
|
// The handler ran and failed; message carries the Go error text.
|
|
AbiErrorCode_ABI_ERROR_CODE_INTERNAL AbiErrorCode = 1
|
|
// The payload could not be decoded.
|
|
AbiErrorCode_ABI_ERROR_CODE_DECODE AbiErrorCode = 2
|
|
// The hook/capability is not implemented by the callee.
|
|
AbiErrorCode_ABI_ERROR_CODE_UNIMPLEMENTED AbiErrorCode = 3
|
|
// The call exceeded its deadline; the instance is considered poisoned.
|
|
AbiErrorCode_ABI_ERROR_CODE_DEADLINE_EXCEEDED AbiErrorCode = 4
|
|
// The caller is not entitled to this capability.
|
|
AbiErrorCode_ABI_ERROR_CODE_PERMISSION_DENIED AbiErrorCode = 5
|
|
)
|
|
|
|
// Enum value maps for AbiErrorCode.
|
|
var (
|
|
AbiErrorCode_name = map[int32]string{
|
|
0: "ABI_ERROR_CODE_UNSPECIFIED",
|
|
1: "ABI_ERROR_CODE_INTERNAL",
|
|
2: "ABI_ERROR_CODE_DECODE",
|
|
3: "ABI_ERROR_CODE_UNIMPLEMENTED",
|
|
4: "ABI_ERROR_CODE_DEADLINE_EXCEEDED",
|
|
5: "ABI_ERROR_CODE_PERMISSION_DENIED",
|
|
}
|
|
AbiErrorCode_value = map[string]int32{
|
|
"ABI_ERROR_CODE_UNSPECIFIED": 0,
|
|
"ABI_ERROR_CODE_INTERNAL": 1,
|
|
"ABI_ERROR_CODE_DECODE": 2,
|
|
"ABI_ERROR_CODE_UNIMPLEMENTED": 3,
|
|
"ABI_ERROR_CODE_DEADLINE_EXCEEDED": 4,
|
|
"ABI_ERROR_CODE_PERMISSION_DENIED": 5,
|
|
}
|
|
)
|
|
|
|
func (x AbiErrorCode) Enum() *AbiErrorCode {
|
|
p := new(AbiErrorCode)
|
|
*p = x
|
|
return p
|
|
}
|
|
|
|
func (x AbiErrorCode) String() string {
|
|
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
|
}
|
|
|
|
func (AbiErrorCode) Descriptor() protoreflect.EnumDescriptor {
|
|
return file_v1_invoke_proto_enumTypes[1].Descriptor()
|
|
}
|
|
|
|
func (AbiErrorCode) Type() protoreflect.EnumType {
|
|
return &file_v1_invoke_proto_enumTypes[1]
|
|
}
|
|
|
|
func (x AbiErrorCode) Number() protoreflect.EnumNumber {
|
|
return protoreflect.EnumNumber(x)
|
|
}
|
|
|
|
// Deprecated: Use AbiErrorCode.Descriptor instead.
|
|
func (AbiErrorCode) EnumDescriptor() ([]byte, []int) {
|
|
return file_v1_invoke_proto_rawDescGZIP(), []int{1}
|
|
}
|
|
|
|
// InvokeRequest is the host→guest call envelope.
|
|
type InvokeRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Hook Hook `protobuf:"varint,1,opt,name=hook,proto3,enum=abi.v1.Hook" json:"hook,omitempty"`
|
|
// Serialized hook-specific request message (see Hook value comments).
|
|
Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"`
|
|
// Milliseconds the guest has to answer; the host also enforces this
|
|
// deadline on the wasm instance (WithCloseOnContextDone).
|
|
DeadlineMs int64 `protobuf:"varint,3,opt,name=deadline_ms,json=deadlineMs,proto3" json:"deadline_ms,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *InvokeRequest) Reset() {
|
|
*x = InvokeRequest{}
|
|
mi := &file_v1_invoke_proto_msgTypes[0]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *InvokeRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*InvokeRequest) ProtoMessage() {}
|
|
|
|
func (x *InvokeRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_v1_invoke_proto_msgTypes[0]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use InvokeRequest.ProtoReflect.Descriptor instead.
|
|
func (*InvokeRequest) Descriptor() ([]byte, []int) {
|
|
return file_v1_invoke_proto_rawDescGZIP(), []int{0}
|
|
}
|
|
|
|
func (x *InvokeRequest) GetHook() Hook {
|
|
if x != nil {
|
|
return x.Hook
|
|
}
|
|
return Hook_HOOK_UNSPECIFIED
|
|
}
|
|
|
|
func (x *InvokeRequest) GetPayload() []byte {
|
|
if x != nil {
|
|
return x.Payload
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *InvokeRequest) GetDeadlineMs() int64 {
|
|
if x != nil {
|
|
return x.DeadlineMs
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// InvokeResponse is the guest→host return envelope.
|
|
type InvokeResponse struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
// Serialized hook-specific response message; empty when error is set.
|
|
Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
|
|
// Set when the hook failed; the host treats decode failures and traps as
|
|
// implicit ABI_ERROR_CODE_INTERNAL.
|
|
Error *AbiError `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *InvokeResponse) Reset() {
|
|
*x = InvokeResponse{}
|
|
mi := &file_v1_invoke_proto_msgTypes[1]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *InvokeResponse) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*InvokeResponse) ProtoMessage() {}
|
|
|
|
func (x *InvokeResponse) ProtoReflect() protoreflect.Message {
|
|
mi := &file_v1_invoke_proto_msgTypes[1]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use InvokeResponse.ProtoReflect.Descriptor instead.
|
|
func (*InvokeResponse) Descriptor() ([]byte, []int) {
|
|
return file_v1_invoke_proto_rawDescGZIP(), []int{1}
|
|
}
|
|
|
|
func (x *InvokeResponse) GetPayload() []byte {
|
|
if x != nil {
|
|
return x.Payload
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *InvokeResponse) GetError() *AbiError {
|
|
if x != nil {
|
|
return x.Error
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// AbiError is the structured error carried by InvokeResponse and
|
|
// HostCallResponse.
|
|
type AbiError struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Code AbiErrorCode `protobuf:"varint,1,opt,name=code,proto3,enum=abi.v1.AbiErrorCode" json:"code,omitempty"`
|
|
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *AbiError) Reset() {
|
|
*x = AbiError{}
|
|
mi := &file_v1_invoke_proto_msgTypes[2]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *AbiError) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*AbiError) ProtoMessage() {}
|
|
|
|
func (x *AbiError) ProtoReflect() protoreflect.Message {
|
|
mi := &file_v1_invoke_proto_msgTypes[2]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use AbiError.ProtoReflect.Descriptor instead.
|
|
func (*AbiError) Descriptor() ([]byte, []int) {
|
|
return file_v1_invoke_proto_rawDescGZIP(), []int{2}
|
|
}
|
|
|
|
func (x *AbiError) GetCode() AbiErrorCode {
|
|
if x != nil {
|
|
return x.Code
|
|
}
|
|
return AbiErrorCode_ABI_ERROR_CODE_UNSPECIFIED
|
|
}
|
|
|
|
func (x *AbiError) GetMessage() string {
|
|
if x != nil {
|
|
return x.Message
|
|
}
|
|
return ""
|
|
}
|
|
|
|
// DescribeRequest asks the guest for its static manifest (publish time only).
|
|
type DescribeRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
// ABI major version of the calling host/publish tool.
|
|
HostAbiVersion uint32 `protobuf:"varint,1,opt,name=host_abi_version,json=hostAbiVersion,proto3" json:"host_abi_version,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *DescribeRequest) Reset() {
|
|
*x = DescribeRequest{}
|
|
mi := &file_v1_invoke_proto_msgTypes[3]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *DescribeRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*DescribeRequest) ProtoMessage() {}
|
|
|
|
func (x *DescribeRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_v1_invoke_proto_msgTypes[3]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use DescribeRequest.ProtoReflect.Descriptor instead.
|
|
func (*DescribeRequest) Descriptor() ([]byte, []int) {
|
|
return file_v1_invoke_proto_rawDescGZIP(), []int{3}
|
|
}
|
|
|
|
func (x *DescribeRequest) GetHostAbiVersion() uint32 {
|
|
if x != nil {
|
|
return x.HostAbiVersion
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// DescribeResponse returns the static manifest.
|
|
type DescribeResponse struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Manifest *PluginManifest `protobuf:"bytes,1,opt,name=manifest,proto3" json:"manifest,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *DescribeResponse) Reset() {
|
|
*x = DescribeResponse{}
|
|
mi := &file_v1_invoke_proto_msgTypes[4]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *DescribeResponse) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*DescribeResponse) ProtoMessage() {}
|
|
|
|
func (x *DescribeResponse) ProtoReflect() protoreflect.Message {
|
|
mi := &file_v1_invoke_proto_msgTypes[4]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use DescribeResponse.ProtoReflect.Descriptor instead.
|
|
func (*DescribeResponse) Descriptor() ([]byte, []int) {
|
|
return file_v1_invoke_proto_rawDescGZIP(), []int{4}
|
|
}
|
|
|
|
func (x *DescribeResponse) GetManifest() *PluginManifest {
|
|
if x != nil {
|
|
return x.Manifest
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// LoadRequest carries the static host configuration the .so world exposed as
|
|
// CoreServices.AppURL / CoreServices.MediaPath.
|
|
type LoadRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
HostConfig *HostConfig `protobuf:"bytes,1,opt,name=host_config,json=hostConfig,proto3" json:"host_config,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *LoadRequest) Reset() {
|
|
*x = LoadRequest{}
|
|
mi := &file_v1_invoke_proto_msgTypes[5]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *LoadRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*LoadRequest) ProtoMessage() {}
|
|
|
|
func (x *LoadRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_v1_invoke_proto_msgTypes[5]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use LoadRequest.ProtoReflect.Descriptor instead.
|
|
func (*LoadRequest) Descriptor() ([]byte, []int) {
|
|
return file_v1_invoke_proto_rawDescGZIP(), []int{5}
|
|
}
|
|
|
|
func (x *LoadRequest) GetHostConfig() *HostConfig {
|
|
if x != nil {
|
|
return x.HostConfig
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// HostConfig mirrors the plain-value CoreServices fields.
|
|
type HostConfig struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
AppUrl string `protobuf:"bytes,1,opt,name=app_url,json=appUrl,proto3" json:"app_url,omitempty"` // CoreServices.AppURL
|
|
MediaPath string `protobuf:"bytes,2,opt,name=media_path,json=mediaPath,proto3" json:"media_path,omitempty"` // CoreServices.MediaPath
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *HostConfig) Reset() {
|
|
*x = HostConfig{}
|
|
mi := &file_v1_invoke_proto_msgTypes[6]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *HostConfig) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*HostConfig) ProtoMessage() {}
|
|
|
|
func (x *HostConfig) ProtoReflect() protoreflect.Message {
|
|
mi := &file_v1_invoke_proto_msgTypes[6]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use HostConfig.ProtoReflect.Descriptor instead.
|
|
func (*HostConfig) Descriptor() ([]byte, []int) {
|
|
return file_v1_invoke_proto_rawDescGZIP(), []int{6}
|
|
}
|
|
|
|
func (x *HostConfig) GetAppUrl() string {
|
|
if x != nil {
|
|
return x.AppUrl
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *HostConfig) GetMediaPath() string {
|
|
if x != nil {
|
|
return x.MediaPath
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type LoadResponse struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *LoadResponse) Reset() {
|
|
*x = LoadResponse{}
|
|
mi := &file_v1_invoke_proto_msgTypes[7]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *LoadResponse) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*LoadResponse) ProtoMessage() {}
|
|
|
|
func (x *LoadResponse) ProtoReflect() protoreflect.Message {
|
|
mi := &file_v1_invoke_proto_msgTypes[7]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use LoadResponse.ProtoReflect.Descriptor instead.
|
|
func (*LoadResponse) Descriptor() ([]byte, []int) {
|
|
return file_v1_invoke_proto_rawDescGZIP(), []int{7}
|
|
}
|
|
|
|
type UnloadRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *UnloadRequest) Reset() {
|
|
*x = UnloadRequest{}
|
|
mi := &file_v1_invoke_proto_msgTypes[8]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *UnloadRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*UnloadRequest) ProtoMessage() {}
|
|
|
|
func (x *UnloadRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_v1_invoke_proto_msgTypes[8]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use UnloadRequest.ProtoReflect.Descriptor instead.
|
|
func (*UnloadRequest) Descriptor() ([]byte, []int) {
|
|
return file_v1_invoke_proto_rawDescGZIP(), []int{8}
|
|
}
|
|
|
|
type UnloadResponse struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *UnloadResponse) Reset() {
|
|
*x = UnloadResponse{}
|
|
mi := &file_v1_invoke_proto_msgTypes[9]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *UnloadResponse) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*UnloadResponse) ProtoMessage() {}
|
|
|
|
func (x *UnloadResponse) ProtoReflect() protoreflect.Message {
|
|
mi := &file_v1_invoke_proto_msgTypes[9]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use UnloadResponse.ProtoReflect.Descriptor instead.
|
|
func (*UnloadResponse) Descriptor() ([]byte, []int) {
|
|
return file_v1_invoke_proto_rawDescGZIP(), []int{9}
|
|
}
|
|
|
|
// JobRequest dispatches one background job to the guest handler registered
|
|
// for job_type (manifest.job_types).
|
|
type JobRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
JobType string `protobuf:"bytes,1,opt,name=job_type,json=jobType,proto3" json:"job_type,omitempty"`
|
|
// JSON job configuration (json.RawMessage in JobHandlerFunc).
|
|
ConfigJson []byte `protobuf:"bytes,2,opt,name=config_json,json=configJson,proto3" json:"config_json,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *JobRequest) Reset() {
|
|
*x = JobRequest{}
|
|
mi := &file_v1_invoke_proto_msgTypes[10]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *JobRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*JobRequest) ProtoMessage() {}
|
|
|
|
func (x *JobRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_v1_invoke_proto_msgTypes[10]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use JobRequest.ProtoReflect.Descriptor instead.
|
|
func (*JobRequest) Descriptor() ([]byte, []int) {
|
|
return file_v1_invoke_proto_rawDescGZIP(), []int{10}
|
|
}
|
|
|
|
func (x *JobRequest) GetJobType() string {
|
|
if x != nil {
|
|
return x.JobType
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *JobRequest) GetConfigJson() []byte {
|
|
if x != nil {
|
|
return x.ConfigJson
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// JobResponse returns the handler's JSON result.
|
|
type JobResponse struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
ResultJson []byte `protobuf:"bytes,1,opt,name=result_json,json=resultJson,proto3" json:"result_json,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *JobResponse) Reset() {
|
|
*x = JobResponse{}
|
|
mi := &file_v1_invoke_proto_msgTypes[11]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *JobResponse) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*JobResponse) ProtoMessage() {}
|
|
|
|
func (x *JobResponse) ProtoReflect() protoreflect.Message {
|
|
mi := &file_v1_invoke_proto_msgTypes[11]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use JobResponse.ProtoReflect.Descriptor instead.
|
|
func (*JobResponse) Descriptor() ([]byte, []int) {
|
|
return file_v1_invoke_proto_rawDescGZIP(), []int{11}
|
|
}
|
|
|
|
func (x *JobResponse) GetResultJson() []byte {
|
|
if x != nil {
|
|
return x.ResultJson
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// RagFetchRequest asks the guest's registered content fetcher
|
|
// (manifest.rag_content_fetcher_types) for a content item's text.
|
|
type RagFetchRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
ContentType string `protobuf:"bytes,1,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"`
|
|
ContentId string `protobuf:"bytes,2,opt,name=content_id,json=contentId,proto3" json:"content_id,omitempty"` // UUID
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *RagFetchRequest) Reset() {
|
|
*x = RagFetchRequest{}
|
|
mi := &file_v1_invoke_proto_msgTypes[12]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *RagFetchRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*RagFetchRequest) ProtoMessage() {}
|
|
|
|
func (x *RagFetchRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_v1_invoke_proto_msgTypes[12]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use RagFetchRequest.ProtoReflect.Descriptor instead.
|
|
func (*RagFetchRequest) Descriptor() ([]byte, []int) {
|
|
return file_v1_invoke_proto_rawDescGZIP(), []int{12}
|
|
}
|
|
|
|
func (x *RagFetchRequest) GetContentType() string {
|
|
if x != nil {
|
|
return x.ContentType
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *RagFetchRequest) GetContentId() string {
|
|
if x != nil {
|
|
return x.ContentId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
// RagFetchResponse mirrors plugin.ContentFetcher's return values.
|
|
type RagFetchResponse struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
|
|
Text string `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *RagFetchResponse) Reset() {
|
|
*x = RagFetchResponse{}
|
|
mi := &file_v1_invoke_proto_msgTypes[13]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *RagFetchResponse) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*RagFetchResponse) ProtoMessage() {}
|
|
|
|
func (x *RagFetchResponse) ProtoReflect() protoreflect.Message {
|
|
mi := &file_v1_invoke_proto_msgTypes[13]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use RagFetchResponse.ProtoReflect.Descriptor instead.
|
|
func (*RagFetchResponse) Descriptor() ([]byte, []int) {
|
|
return file_v1_invoke_proto_rawDescGZIP(), []int{13}
|
|
}
|
|
|
|
func (x *RagFetchResponse) GetTitle() string {
|
|
if x != nil {
|
|
return x.Title
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *RagFetchResponse) GetText() string {
|
|
if x != nil {
|
|
return x.Text
|
|
}
|
|
return ""
|
|
}
|
|
|
|
// MediaHookRequest delivers one media lifecycle event
|
|
// (plugin.MediaHooksProvider).
|
|
type MediaHookRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
// Types that are valid to be assigned to Event:
|
|
//
|
|
// *MediaHookRequest_MediaAnalyzed
|
|
// *MediaHookRequest_ModerationDecision
|
|
Event isMediaHookRequest_Event `protobuf_oneof:"event"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *MediaHookRequest) Reset() {
|
|
*x = MediaHookRequest{}
|
|
mi := &file_v1_invoke_proto_msgTypes[14]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *MediaHookRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*MediaHookRequest) ProtoMessage() {}
|
|
|
|
func (x *MediaHookRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_v1_invoke_proto_msgTypes[14]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use MediaHookRequest.ProtoReflect.Descriptor instead.
|
|
func (*MediaHookRequest) Descriptor() ([]byte, []int) {
|
|
return file_v1_invoke_proto_rawDescGZIP(), []int{14}
|
|
}
|
|
|
|
func (x *MediaHookRequest) GetEvent() isMediaHookRequest_Event {
|
|
if x != nil {
|
|
return x.Event
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *MediaHookRequest) GetMediaAnalyzed() *MediaAnalyzedEvent {
|
|
if x != nil {
|
|
if x, ok := x.Event.(*MediaHookRequest_MediaAnalyzed); ok {
|
|
return x.MediaAnalyzed
|
|
}
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *MediaHookRequest) GetModerationDecision() *ModerationDecisionEvent {
|
|
if x != nil {
|
|
if x, ok := x.Event.(*MediaHookRequest_ModerationDecision); ok {
|
|
return x.ModerationDecision
|
|
}
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type isMediaHookRequest_Event interface {
|
|
isMediaHookRequest_Event()
|
|
}
|
|
|
|
type MediaHookRequest_MediaAnalyzed struct {
|
|
MediaAnalyzed *MediaAnalyzedEvent `protobuf:"bytes,1,opt,name=media_analyzed,json=mediaAnalyzed,proto3,oneof"` // OnMediaAnalyzed
|
|
}
|
|
|
|
type MediaHookRequest_ModerationDecision struct {
|
|
ModerationDecision *ModerationDecisionEvent `protobuf:"bytes,2,opt,name=moderation_decision,json=moderationDecision,proto3,oneof"` // OnModerationDecision
|
|
}
|
|
|
|
func (*MediaHookRequest_MediaAnalyzed) isMediaHookRequest_Event() {}
|
|
|
|
func (*MediaHookRequest_ModerationDecision) isMediaHookRequest_Event() {}
|
|
|
|
type MediaHookResponse struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *MediaHookResponse) Reset() {
|
|
*x = MediaHookResponse{}
|
|
mi := &file_v1_invoke_proto_msgTypes[15]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *MediaHookResponse) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*MediaHookResponse) ProtoMessage() {}
|
|
|
|
func (x *MediaHookResponse) ProtoReflect() protoreflect.Message {
|
|
mi := &file_v1_invoke_proto_msgTypes[15]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use MediaHookResponse.ProtoReflect.Descriptor instead.
|
|
func (*MediaHookResponse) Descriptor() ([]byte, []int) {
|
|
return file_v1_invoke_proto_rawDescGZIP(), []int{15}
|
|
}
|
|
|
|
// MediaAnalyzedEvent mirrors plugin.MediaAnalyzedEvent (UUIDs as strings).
|
|
type MediaAnalyzedEvent struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
MediaId string `protobuf:"bytes,1,opt,name=media_id,json=mediaId,proto3" json:"media_id,omitempty"`
|
|
AnalysisId string `protobuf:"bytes,2,opt,name=analysis_id,json=analysisId,proto3" json:"analysis_id,omitempty"`
|
|
ContentHash string `protobuf:"bytes,3,opt,name=content_hash,json=contentHash,proto3" json:"content_hash,omitempty"`
|
|
Status string `protobuf:"bytes,4,opt,name=status,proto3" json:"status,omitempty"`
|
|
SourcePlugin string `protobuf:"bytes,5,opt,name=source_plugin,json=sourcePlugin,proto3" json:"source_plugin,omitempty"`
|
|
SourceType string `protobuf:"bytes,6,opt,name=source_type,json=sourceType,proto3" json:"source_type,omitempty"`
|
|
SourceRefId string `protobuf:"bytes,7,opt,name=source_ref_id,json=sourceRefId,proto3" json:"source_ref_id,omitempty"`
|
|
SafeAdult string `protobuf:"bytes,8,opt,name=safe_adult,json=safeAdult,proto3" json:"safe_adult,omitempty"`
|
|
SafeViolence string `protobuf:"bytes,9,opt,name=safe_violence,json=safeViolence,proto3" json:"safe_violence,omitempty"`
|
|
SafeRacy string `protobuf:"bytes,10,opt,name=safe_racy,json=safeRacy,proto3" json:"safe_racy,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *MediaAnalyzedEvent) Reset() {
|
|
*x = MediaAnalyzedEvent{}
|
|
mi := &file_v1_invoke_proto_msgTypes[16]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *MediaAnalyzedEvent) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*MediaAnalyzedEvent) ProtoMessage() {}
|
|
|
|
func (x *MediaAnalyzedEvent) ProtoReflect() protoreflect.Message {
|
|
mi := &file_v1_invoke_proto_msgTypes[16]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use MediaAnalyzedEvent.ProtoReflect.Descriptor instead.
|
|
func (*MediaAnalyzedEvent) Descriptor() ([]byte, []int) {
|
|
return file_v1_invoke_proto_rawDescGZIP(), []int{16}
|
|
}
|
|
|
|
func (x *MediaAnalyzedEvent) GetMediaId() string {
|
|
if x != nil {
|
|
return x.MediaId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *MediaAnalyzedEvent) GetAnalysisId() string {
|
|
if x != nil {
|
|
return x.AnalysisId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *MediaAnalyzedEvent) GetContentHash() string {
|
|
if x != nil {
|
|
return x.ContentHash
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *MediaAnalyzedEvent) GetStatus() string {
|
|
if x != nil {
|
|
return x.Status
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *MediaAnalyzedEvent) GetSourcePlugin() string {
|
|
if x != nil {
|
|
return x.SourcePlugin
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *MediaAnalyzedEvent) GetSourceType() string {
|
|
if x != nil {
|
|
return x.SourceType
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *MediaAnalyzedEvent) GetSourceRefId() string {
|
|
if x != nil {
|
|
return x.SourceRefId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *MediaAnalyzedEvent) GetSafeAdult() string {
|
|
if x != nil {
|
|
return x.SafeAdult
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *MediaAnalyzedEvent) GetSafeViolence() string {
|
|
if x != nil {
|
|
return x.SafeViolence
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *MediaAnalyzedEvent) GetSafeRacy() string {
|
|
if x != nil {
|
|
return x.SafeRacy
|
|
}
|
|
return ""
|
|
}
|
|
|
|
// ModerationDecisionEvent mirrors plugin.ModerationDecisionEvent.
|
|
type ModerationDecisionEvent struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
MediaId string `protobuf:"bytes,1,opt,name=media_id,json=mediaId,proto3" json:"media_id,omitempty"`
|
|
AnalysisId string `protobuf:"bytes,2,opt,name=analysis_id,json=analysisId,proto3" json:"analysis_id,omitempty"`
|
|
Status string `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"`
|
|
PreviousStatus string `protobuf:"bytes,4,opt,name=previous_status,json=previousStatus,proto3" json:"previous_status,omitempty"`
|
|
SourcePlugin string `protobuf:"bytes,5,opt,name=source_plugin,json=sourcePlugin,proto3" json:"source_plugin,omitempty"`
|
|
SourceType string `protobuf:"bytes,6,opt,name=source_type,json=sourceType,proto3" json:"source_type,omitempty"`
|
|
SourceRefId string `protobuf:"bytes,7,opt,name=source_ref_id,json=sourceRefId,proto3" json:"source_ref_id,omitempty"`
|
|
ModeratedBy string `protobuf:"bytes,8,opt,name=moderated_by,json=moderatedBy,proto3" json:"moderated_by,omitempty"`
|
|
Note string `protobuf:"bytes,9,opt,name=note,proto3" json:"note,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *ModerationDecisionEvent) Reset() {
|
|
*x = ModerationDecisionEvent{}
|
|
mi := &file_v1_invoke_proto_msgTypes[17]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *ModerationDecisionEvent) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*ModerationDecisionEvent) ProtoMessage() {}
|
|
|
|
func (x *ModerationDecisionEvent) ProtoReflect() protoreflect.Message {
|
|
mi := &file_v1_invoke_proto_msgTypes[17]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use ModerationDecisionEvent.ProtoReflect.Descriptor instead.
|
|
func (*ModerationDecisionEvent) Descriptor() ([]byte, []int) {
|
|
return file_v1_invoke_proto_rawDescGZIP(), []int{17}
|
|
}
|
|
|
|
func (x *ModerationDecisionEvent) GetMediaId() string {
|
|
if x != nil {
|
|
return x.MediaId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *ModerationDecisionEvent) GetAnalysisId() string {
|
|
if x != nil {
|
|
return x.AnalysisId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *ModerationDecisionEvent) GetStatus() string {
|
|
if x != nil {
|
|
return x.Status
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *ModerationDecisionEvent) GetPreviousStatus() string {
|
|
if x != nil {
|
|
return x.PreviousStatus
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *ModerationDecisionEvent) GetSourcePlugin() string {
|
|
if x != nil {
|
|
return x.SourcePlugin
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *ModerationDecisionEvent) GetSourceType() string {
|
|
if x != nil {
|
|
return x.SourceType
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *ModerationDecisionEvent) GetSourceRefId() string {
|
|
if x != nil {
|
|
return x.SourceRefId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *ModerationDecisionEvent) GetModeratedBy() string {
|
|
if x != nil {
|
|
return x.ModeratedBy
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *ModerationDecisionEvent) GetNote() string {
|
|
if x != nil {
|
|
return x.Note
|
|
}
|
|
return ""
|
|
}
|
|
|
|
var File_v1_invoke_proto protoreflect.FileDescriptor
|
|
|
|
const file_v1_invoke_proto_rawDesc = "" +
|
|
"\n" +
|
|
"\x0fv1/invoke.proto\x12\x06abi.v1\x1a\x11v1/manifest.proto\"l\n" +
|
|
"\rInvokeRequest\x12 \n" +
|
|
"\x04hook\x18\x01 \x01(\x0e2\f.abi.v1.HookR\x04hook\x12\x18\n" +
|
|
"\apayload\x18\x02 \x01(\fR\apayload\x12\x1f\n" +
|
|
"\vdeadline_ms\x18\x03 \x01(\x03R\n" +
|
|
"deadlineMs\"R\n" +
|
|
"\x0eInvokeResponse\x12\x18\n" +
|
|
"\apayload\x18\x01 \x01(\fR\apayload\x12&\n" +
|
|
"\x05error\x18\x02 \x01(\v2\x10.abi.v1.AbiErrorR\x05error\"N\n" +
|
|
"\bAbiError\x12(\n" +
|
|
"\x04code\x18\x01 \x01(\x0e2\x14.abi.v1.AbiErrorCodeR\x04code\x12\x18\n" +
|
|
"\amessage\x18\x02 \x01(\tR\amessage\";\n" +
|
|
"\x0fDescribeRequest\x12(\n" +
|
|
"\x10host_abi_version\x18\x01 \x01(\rR\x0ehostAbiVersion\"F\n" +
|
|
"\x10DescribeResponse\x122\n" +
|
|
"\bmanifest\x18\x01 \x01(\v2\x16.abi.v1.PluginManifestR\bmanifest\"B\n" +
|
|
"\vLoadRequest\x123\n" +
|
|
"\vhost_config\x18\x01 \x01(\v2\x12.abi.v1.HostConfigR\n" +
|
|
"hostConfig\"D\n" +
|
|
"\n" +
|
|
"HostConfig\x12\x17\n" +
|
|
"\aapp_url\x18\x01 \x01(\tR\x06appUrl\x12\x1d\n" +
|
|
"\n" +
|
|
"media_path\x18\x02 \x01(\tR\tmediaPath\"\x0e\n" +
|
|
"\fLoadResponse\"\x0f\n" +
|
|
"\rUnloadRequest\"\x10\n" +
|
|
"\x0eUnloadResponse\"H\n" +
|
|
"\n" +
|
|
"JobRequest\x12\x19\n" +
|
|
"\bjob_type\x18\x01 \x01(\tR\ajobType\x12\x1f\n" +
|
|
"\vconfig_json\x18\x02 \x01(\fR\n" +
|
|
"configJson\".\n" +
|
|
"\vJobResponse\x12\x1f\n" +
|
|
"\vresult_json\x18\x01 \x01(\fR\n" +
|
|
"resultJson\"S\n" +
|
|
"\x0fRagFetchRequest\x12!\n" +
|
|
"\fcontent_type\x18\x01 \x01(\tR\vcontentType\x12\x1d\n" +
|
|
"\n" +
|
|
"content_id\x18\x02 \x01(\tR\tcontentId\"<\n" +
|
|
"\x10RagFetchResponse\x12\x14\n" +
|
|
"\x05title\x18\x01 \x01(\tR\x05title\x12\x12\n" +
|
|
"\x04text\x18\x02 \x01(\tR\x04text\"\xb4\x01\n" +
|
|
"\x10MediaHookRequest\x12C\n" +
|
|
"\x0emedia_analyzed\x18\x01 \x01(\v2\x1a.abi.v1.MediaAnalyzedEventH\x00R\rmediaAnalyzed\x12R\n" +
|
|
"\x13moderation_decision\x18\x02 \x01(\v2\x1f.abi.v1.ModerationDecisionEventH\x00R\x12moderationDecisionB\a\n" +
|
|
"\x05event\"\x13\n" +
|
|
"\x11MediaHookResponse\"\xd6\x02\n" +
|
|
"\x12MediaAnalyzedEvent\x12\x19\n" +
|
|
"\bmedia_id\x18\x01 \x01(\tR\amediaId\x12\x1f\n" +
|
|
"\vanalysis_id\x18\x02 \x01(\tR\n" +
|
|
"analysisId\x12!\n" +
|
|
"\fcontent_hash\x18\x03 \x01(\tR\vcontentHash\x12\x16\n" +
|
|
"\x06status\x18\x04 \x01(\tR\x06status\x12#\n" +
|
|
"\rsource_plugin\x18\x05 \x01(\tR\fsourcePlugin\x12\x1f\n" +
|
|
"\vsource_type\x18\x06 \x01(\tR\n" +
|
|
"sourceType\x12\"\n" +
|
|
"\rsource_ref_id\x18\a \x01(\tR\vsourceRefId\x12\x1d\n" +
|
|
"\n" +
|
|
"safe_adult\x18\b \x01(\tR\tsafeAdult\x12#\n" +
|
|
"\rsafe_violence\x18\t \x01(\tR\fsafeViolence\x12\x1b\n" +
|
|
"\tsafe_racy\x18\n" +
|
|
" \x01(\tR\bsafeRacy\"\xb7\x02\n" +
|
|
"\x17ModerationDecisionEvent\x12\x19\n" +
|
|
"\bmedia_id\x18\x01 \x01(\tR\amediaId\x12\x1f\n" +
|
|
"\vanalysis_id\x18\x02 \x01(\tR\n" +
|
|
"analysisId\x12\x16\n" +
|
|
"\x06status\x18\x03 \x01(\tR\x06status\x12'\n" +
|
|
"\x0fprevious_status\x18\x04 \x01(\tR\x0epreviousStatus\x12#\n" +
|
|
"\rsource_plugin\x18\x05 \x01(\tR\fsourcePlugin\x12\x1f\n" +
|
|
"\vsource_type\x18\x06 \x01(\tR\n" +
|
|
"sourceType\x12\"\n" +
|
|
"\rsource_ref_id\x18\a \x01(\tR\vsourceRefId\x12!\n" +
|
|
"\fmoderated_by\x18\b \x01(\tR\vmoderatedBy\x12\x12\n" +
|
|
"\x04note\x18\t \x01(\tR\x04note*\xcd\x01\n" +
|
|
"\x04Hook\x12\x14\n" +
|
|
"\x10HOOK_UNSPECIFIED\x10\x00\x12\x15\n" +
|
|
"\x11HOOK_RENDER_BLOCK\x10\x01\x12\x18\n" +
|
|
"\x14HOOK_RENDER_TEMPLATE\x10\x02\x12\x14\n" +
|
|
"\x10HOOK_HANDLE_HTTP\x10\x03\x12\f\n" +
|
|
"\bHOOK_JOB\x10\x04\x12\r\n" +
|
|
"\tHOOK_LOAD\x10\x05\x12\x0f\n" +
|
|
"\vHOOK_UNLOAD\x10\x06\x12\x12\n" +
|
|
"\x0eHOOK_RAG_FETCH\x10\a\x12\x13\n" +
|
|
"\x0fHOOK_MEDIA_HOOK\x10\b\x12\x11\n" +
|
|
"\rHOOK_DESCRIBE\x10\t*\xd4\x01\n" +
|
|
"\fAbiErrorCode\x12\x1e\n" +
|
|
"\x1aABI_ERROR_CODE_UNSPECIFIED\x10\x00\x12\x1b\n" +
|
|
"\x17ABI_ERROR_CODE_INTERNAL\x10\x01\x12\x19\n" +
|
|
"\x15ABI_ERROR_CODE_DECODE\x10\x02\x12 \n" +
|
|
"\x1cABI_ERROR_CODE_UNIMPLEMENTED\x10\x03\x12$\n" +
|
|
" ABI_ERROR_CODE_DEADLINE_EXCEEDED\x10\x04\x12$\n" +
|
|
" ABI_ERROR_CODE_PERMISSION_DENIED\x10\x05B0Z.git.dev.alexdunmow.com/block/core/abi/v1;abiv1b\x06proto3"
|
|
|
|
var (
|
|
file_v1_invoke_proto_rawDescOnce sync.Once
|
|
file_v1_invoke_proto_rawDescData []byte
|
|
)
|
|
|
|
func file_v1_invoke_proto_rawDescGZIP() []byte {
|
|
file_v1_invoke_proto_rawDescOnce.Do(func() {
|
|
file_v1_invoke_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_v1_invoke_proto_rawDesc), len(file_v1_invoke_proto_rawDesc)))
|
|
})
|
|
return file_v1_invoke_proto_rawDescData
|
|
}
|
|
|
|
var file_v1_invoke_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
|
|
var file_v1_invoke_proto_msgTypes = make([]protoimpl.MessageInfo, 18)
|
|
var file_v1_invoke_proto_goTypes = []any{
|
|
(Hook)(0), // 0: abi.v1.Hook
|
|
(AbiErrorCode)(0), // 1: abi.v1.AbiErrorCode
|
|
(*InvokeRequest)(nil), // 2: abi.v1.InvokeRequest
|
|
(*InvokeResponse)(nil), // 3: abi.v1.InvokeResponse
|
|
(*AbiError)(nil), // 4: abi.v1.AbiError
|
|
(*DescribeRequest)(nil), // 5: abi.v1.DescribeRequest
|
|
(*DescribeResponse)(nil), // 6: abi.v1.DescribeResponse
|
|
(*LoadRequest)(nil), // 7: abi.v1.LoadRequest
|
|
(*HostConfig)(nil), // 8: abi.v1.HostConfig
|
|
(*LoadResponse)(nil), // 9: abi.v1.LoadResponse
|
|
(*UnloadRequest)(nil), // 10: abi.v1.UnloadRequest
|
|
(*UnloadResponse)(nil), // 11: abi.v1.UnloadResponse
|
|
(*JobRequest)(nil), // 12: abi.v1.JobRequest
|
|
(*JobResponse)(nil), // 13: abi.v1.JobResponse
|
|
(*RagFetchRequest)(nil), // 14: abi.v1.RagFetchRequest
|
|
(*RagFetchResponse)(nil), // 15: abi.v1.RagFetchResponse
|
|
(*MediaHookRequest)(nil), // 16: abi.v1.MediaHookRequest
|
|
(*MediaHookResponse)(nil), // 17: abi.v1.MediaHookResponse
|
|
(*MediaAnalyzedEvent)(nil), // 18: abi.v1.MediaAnalyzedEvent
|
|
(*ModerationDecisionEvent)(nil), // 19: abi.v1.ModerationDecisionEvent
|
|
(*PluginManifest)(nil), // 20: abi.v1.PluginManifest
|
|
}
|
|
var file_v1_invoke_proto_depIdxs = []int32{
|
|
0, // 0: abi.v1.InvokeRequest.hook:type_name -> abi.v1.Hook
|
|
4, // 1: abi.v1.InvokeResponse.error:type_name -> abi.v1.AbiError
|
|
1, // 2: abi.v1.AbiError.code:type_name -> abi.v1.AbiErrorCode
|
|
20, // 3: abi.v1.DescribeResponse.manifest:type_name -> abi.v1.PluginManifest
|
|
8, // 4: abi.v1.LoadRequest.host_config:type_name -> abi.v1.HostConfig
|
|
18, // 5: abi.v1.MediaHookRequest.media_analyzed:type_name -> abi.v1.MediaAnalyzedEvent
|
|
19, // 6: abi.v1.MediaHookRequest.moderation_decision:type_name -> abi.v1.ModerationDecisionEvent
|
|
7, // [7:7] is the sub-list for method output_type
|
|
7, // [7:7] is the sub-list for method input_type
|
|
7, // [7:7] is the sub-list for extension type_name
|
|
7, // [7:7] is the sub-list for extension extendee
|
|
0, // [0:7] is the sub-list for field type_name
|
|
}
|
|
|
|
func init() { file_v1_invoke_proto_init() }
|
|
func file_v1_invoke_proto_init() {
|
|
if File_v1_invoke_proto != nil {
|
|
return
|
|
}
|
|
file_v1_manifest_proto_init()
|
|
file_v1_invoke_proto_msgTypes[14].OneofWrappers = []any{
|
|
(*MediaHookRequest_MediaAnalyzed)(nil),
|
|
(*MediaHookRequest_ModerationDecision)(nil),
|
|
}
|
|
type x struct{}
|
|
out := protoimpl.TypeBuilder{
|
|
File: protoimpl.DescBuilder{
|
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
|
RawDescriptor: unsafe.Slice(unsafe.StringData(file_v1_invoke_proto_rawDesc), len(file_v1_invoke_proto_rawDesc)),
|
|
NumEnums: 2,
|
|
NumMessages: 18,
|
|
NumExtensions: 0,
|
|
NumServices: 0,
|
|
},
|
|
GoTypes: file_v1_invoke_proto_goTypes,
|
|
DependencyIndexes: file_v1_invoke_proto_depIdxs,
|
|
EnumInfos: file_v1_invoke_proto_enumTypes,
|
|
MessageInfos: file_v1_invoke_proto_msgTypes,
|
|
}.Build()
|
|
File_v1_invoke_proto = out.File
|
|
file_v1_invoke_proto_goTypes = nil
|
|
file_v1_invoke_proto_depIdxs = nil
|
|
}
|