Parcel.CoreEngine.Service

Parcel.CoreEngine.Service.Ama.AmaExecutionEngine

Ama stated execution engine

Parcel.CoreEngine.Service.Ama.AmaRuntime

A hybrid runtime helper for Ama

Parcel.CoreEngine.Service.Interpretation.AmaServiceProvider

A context-safe interpolation stated service provider; It provides "step-wise" construction of the entire document.

Parcel.CoreEngine.Service.Interpretation.AmaServiceProvider.CreateNode()

Ask server to replicate a node. The client will be responsible for feeding all definition information about the node - this is essential especially for front-end only nodes, which the server should just store without questioning what's it used for.

Parcel.CoreEngine.Service.Interpretation.AmaServiceProvider.EvaluateNode()

Remarks

The front-end caller of this function expects all objects return values represent Payload, so we should explicitly return Paylaod from this endpoint

Parcel.CoreEngine.Service.Interpretation.ActionReference

Remarks

WIP intermediate type between Callable and FunctionalNodeDescription while we work out more details. Deals with representation, serialization and encoding/decoding. This provides "function-as-first-class" reference to existing functions/custom functions (lambdas, snippets) and nodes/node graphs.

Parcel.CoreEngine.Service.Interpretation.ActionReference.GetAction()

Get the action (as delegate object)

Parcel.CoreEngine.Service.Interpretation.ActionReference.TryDereference()

// Given a delegate object, try dereference it into encoding action string

Parcel.CoreEngine.Service.Interpretation.GraphRuntime.NodeTargetPathStructureProtocolSyntax

Remarks

Pattern:
^({(.*?)})?(\\[(.*?)\\])?((.*?):)?(.*?)$

Explanation:

            ○ Match if at the beginning of the string.
            ○ Optional (greedy).
                ○ 1st capture group.
                    ○ Match '{'.
                    ○ 2nd capture group.
                        ○ Match a character other than '\n' lazily any number of times.
                    ○ Match '}'.
            ○ Optional (greedy).
                ○ 3rd capture group.
                    ○ Match '['.
                    ○ 4th capture group.
                        ○ Match a character other than '\n' lazily any number of times.
                    ○ Match ']'.
            ○ Optional (greedy).
                ○ 5th capture group.
                    ○ 6th capture group.
                        ○ Match a character other than '\n' lazily any number of times.
                    ○ Match ':'.
            ○ 7th capture group.
                ○ Match a character other than '\n' lazily any number of times.
            ○ Match if at the end of the string or if before an ending newline.

Parcel.CoreEngine.Service.Interpretation.InteroperationHelper

Provide services for coercion at method and parameter level, Provide services for converting well-known objects from strings to values and vice versa, Provide serivces for converting well-known objects from C# (Parcel) to Python.

Parcel.CoreEngine.Service.Interpretation.InteroperationHelper.ShouldCoerce()

Tests as first positional argument for the target method whether this operation needs to be coerced

Parcel.CoreEngine.Service.Interpretation.InterpolationServiceProvider

A context-safe interpolation serfice provider; The services provided here are stateless, use Ama Service Provider for stated services.

Parcel.CoreEngine.Service.Interpretation.InterpolationServiceProvider.EvaluateSubGraph()

Given a self-contained set of Parcel Nodes, evaluate them all and return results for each node. This function assumes a graph-free loose set of nodes witht interdependancies specified using standard attribute syntax. The return payload will be in the order of input nodes and have one payload for each node.

Parcel.CoreEngine.Service.Interpretation.InvokationService

Notice this doesn't deal with state isolation at all; For proper state isolation, we should depend on Parcel.NExT.Interpreter

Parcel.CoreEngine.Service.Compilation.ReflectionRuntime

A runtime using C# reflection

Parcel.CoreEngine.Service.CoreExtensions.ParcelNodeExtension

Provide standalone node-as-service execution services

Parcel.CoreEngine.Service.CoreExtensions.ParcelNodePayloadAccessHelper

Provides methods for payload marshaling and extraction

Parcel.CoreEngine.Service.CoreExtensions.ParcelNodePayloadAccessHelper.ExtractNumericalValue()

Extract numerical values from payload following a few conventions - TO BE DEFINED

Parcel.CoreEngine.Service.Document.DocumentProvisionService

The operations offered by Ama are equivalent to creating and editing graphs in the GUI

Parcel.CoreEngine.Service.Document.DocumentProvisionService.Document

State of the document

Parcel.CoreEngine.Service.Document.DocumentProvisionService.DeleteAll

Delete all nodes and graphs, reset "Default" graph

Parcel.CoreEngine.Service.Document.DocumentProvisionService.CreateGraph()

Create new graph with given name.

Parcel.CoreEngine.Service.Document.DocumentProvisionService.ClearGraph()

Clear all nodes in a graph

Parcel.CoreEngine.Service.Libraries.ParcelCore.Constructs.Exec()

A simple execute code node: executes code in a local function scope. The code must have a single return string return value that tells which next exec pin to pick.

Parcel.CoreEngine.Service.Libraries.ParcelCore.DataAnalytics.ComputeTableStats()

Reads a csv string and computes all known stats on computable columns; Assumes csv has header

Parcel.CoreEngine.Service.Libraries.ParcelCore.DataAnalytics.ReadCSV()

A mega node that reads CSV and performs advanced post-processing and generates a bunch of optional outputs

Parcel.CoreEngine.Service.Libraries.ParcelCore.DataAnalytics.Query()

Queries datagrid using SQL.

Remarks

Internally uses SQLite; Provides oneshot query only.

Returns

Returns a new DataGrid.

Parcel.CoreEngine.Service.Libraries.ParcelCore.DataAnalytics.Query()

Run SQL query on data

Parcel.CoreEngine.Service.Libraries.ParcelCore.DataSource.LoadFromCSV()

Reads a CSV and returns content as DataGrid

Parcel.CoreEngine.Service.Libraries.ParcelCore.DataSource.LoadFromODBC()

Fetch from ODBC

Parcel.CoreEngine.Service.LibraryProvider.TargetEndPoint

Conceptually either Type or Method will be available as per EndPointNature; However, since all methods in C# have a type, when referring to C# endpoints, Type is always available, even for static methods; For Python, however, since there is no Type, and since there is no C# MethodInfo, only Identifier will be available.

Parcel.CoreEngine.Service.LibraryProvider.TargetEndPoint.#ctor()

Conceptually either Type or Method will be available as per EndPointNature; However, since all methods in C# have a type, when referring to C# endpoints, Type is always available, even for static methods; For Python, however, since there is no Type, and since there is no C# MethodInfo, only Identifier will be available.

Parcel.CoreEngine.Service.LibraryProvider.LibraryProviderServices

Single-entry provider for all service-inquiry related functions. Methods exposed here are backbone for all backend services related to service inquiry.

Remarks

Methods provides here are generally meaningful for direct backend use, i.e. the return types are typically well-defined serializable primitives, structures, etc. Methods here do NOT need to return string-serialized values and can return any general type that's serializable (though in general should avoid complex types) - serialization is the responsibility of back-ends.

Parcel.CoreEngine.Service.LibraryProvider.LibraryProviderServices.GetAvailableServices

Get all available public instance methods in this class that are meaningful for backend use.

Returns

Return excludes this method itself and some C# standard instance methods

Parcel.CoreEngine.Service.LibraryProvider.LibraryProviderServices.GetAllTargetPaths

Get all valid endpoints including types and (global/static) methods; Excluding type specific instance methods. TODO: Provide a method to get full NodeTargetDescriptors instead of just names

Remarks

Potentially heavy

Parcel.CoreEngine.Service.LibraryProvider.LibraryServiceHelper.GetLoadedUserFacingAssemblies

Get all loaded assemblies in current application domain that are Parcel-user facing, i.e. exclude Parcel runtime engine specific assemblies

Parcel.CoreEngine.Service.Localization.ParcelCoreEngineServiceStringResources.LoadedTypeNames

Global loaded and identifiable type names, from type identification string to display name.

Remarks

During runtime we generally only add to this dictionary and never modify or remove from it.

Parcel.CoreEngine.Service.Runtime.FailureReportMode

Denotes in what context is current graph being evaluated, or dictates how should nodes handle errors.

Parcel.CoreEngine.Service.Runtime.FailureReportMode.Benign

The graph is run in graph editor, in which case failure at nodes typically doesn't cause any harm and is expected by the GUI.

Remarks

Nodes return an Error result message in this case and don't throw any exceptions.

Parcel.CoreEngine.Service.Runtime.FailureReportMode.MissionCritical

The graph is run in automation/application/CLI, in which case failure at nodes should halt the program (by directly throwing exceptions instead of returning a benign/harmless "Error" NodeMessageType) unless handled otherwise by the runner/host

Parcel.CoreEngine.Service.Runtime.GeneralPurposeRedirectedTextWriter.OutputHandler

Configures the output handling to use

Parcel.CoreEngine.Service.Runtime.QuickStore

Provides a strongly typed alternative to environment variables, and possibly with more refined states. Session Storage, Named Storage and Permanent Storage is the key to dataflow context state. Those are useful in multi-interaction GUI graph utility programs and also may be handy in multi-use automation graphs, in both of which cases the same graph may be executed multiple times.

Parcel.CoreEngine.Service.Runtime.QuickStore.StorageConfiguration.BackstorePath

Path of the backstore database.

Parcel.CoreEngine.Service.Runtime.QuickStore.DefaultSessionStorage

Remarks

Consider using for session storage we actually use a backend file instead of a static, process-wise dictionary. However notice in that case the handling of "obj" might be tricky.

Parcel.CoreEngine.Service.Runtime.QuickStore.SessionStorage

Session storage (static, process-wise).

Remarks

TODO: Notice we need some detailed specialization otherwise this will likely cause problem with Desktop Simulator.

Parcel.CoreEngine.Service.Runtime.RuntimeEngine.Interpretative

Aka. Ama

Parcel.CoreEngine.Service.Runtime.RuntimeEngine.Compiled

Aka.Spark

Parcel.CoreEngine.Service.ServiceProvider.GetAvailableServices

Get all available public instance methods in this class that are meaningful for backend use.

Returns

Return excludes this method itself and some C# standard instance methods

Parcel.CoreEngine.Service.ServiceProvider.ResolveTarget()

Given a target protocol, find the matching endpoint to use.

Parcel.Neo.Base.Framework.IToolboxDefinition.ToolboxName

Name for display purpose.

Parcel.Neo.Base.Framework.IToolboxDefinition.ExportNodes

Definition of availabnle tool nodes from the toolbox.

Parcel.Neo.Base.Framework.ToolboxIndexer

Remarks

TODO: Rename to ToolboxManager

Parcel.Neo.Base.Framework.ToolboxIndexer.AssemblyToolboxDefinition

Represents an entire assembly with conventional loading. This is the most "native" way of importing functions.

Parameters

NameDescriptionDefault
ToolboxName Serve as override if provided

Parcel.Neo.Base.Framework.ToolboxIndexer.AssemblyToolboxDefinition.#ctor()

Represents an entire assembly with conventional loading. This is the most "native" way of importing functions.

Parameters

NameDescriptionDefault
ToolboxName Serve as override if provided

Parcel.Neo.Base.Framework.ToolboxIndexer.AssemblyToolboxDefinition.ToolboxName

Serve as override if provided

Parcel.Neo.Base.Framework.ToolboxIndexer.TypeToolboxDefinition

Represents a specific type to be exposed.

Remarks

Notice our current convention dictates that the Type (and its Type name) is a "category". Notice this will not by default include subtypes defined within the type.

Parameters

NameDescriptionDefault
ToolboxName Serve as override if provided and caller must handle localization
Type The type to be indexed.
IncludeSubtypes Whether to also index subtypes.
IncludeNames The (only) names to be included from the type. Overridable by `hidden` tag and excludeNames. This is the reflection name (aka. EnglishMemberName).
ExcludeNames The names to be excluded, higher precendence than `hidden` tag. This is the reflection name (aka. EnglishMemberName).
AllConst Whether we should treat all instance members as "const" from the type.
categoryOverride Optionally override the category name instead of using the default conventional category name

Parcel.Neo.Base.Framework.ToolboxIndexer.TypeToolboxDefinition.#ctor()

Represents a specific type to be exposed.

Remarks

Notice our current convention dictates that the Type (and its Type name) is a "category". Notice this will not by default include subtypes defined within the type.

Parameters

NameDescriptionDefault
ToolboxName Serve as override if provided and caller must handle localization
Type The type to be indexed.
IncludeSubtypes Whether to also index subtypes.
IncludeNames The (only) names to be included from the type. Overridable by `hidden` tag and excludeNames. This is the reflection name (aka. EnglishMemberName).
ExcludeNames The names to be excluded, higher precendence than `hidden` tag. This is the reflection name (aka. EnglishMemberName).
AllConst Whether we should treat all instance members as "const" from the type.
categoryOverride Optionally override the category name instead of using the default conventional category name

Parcel.Neo.Base.Framework.ToolboxIndexer.TypeToolboxDefinition.ToolboxName

Serve as override if provided and caller must handle localization

Parcel.Neo.Base.Framework.ToolboxIndexer.TypeToolboxDefinition.Type

The type to be indexed.

Parcel.Neo.Base.Framework.ToolboxIndexer.TypeToolboxDefinition.IncludeSubtypes

Whether to also index subtypes.

Parcel.Neo.Base.Framework.ToolboxIndexer.TypeToolboxDefinition.IncludeNames

The (only) names to be included from the type. Overridable by `hidden` tag and excludeNames. This is the reflection name (aka. EnglishMemberName).

Parcel.Neo.Base.Framework.ToolboxIndexer.TypeToolboxDefinition.ExcludeNames

The names to be excluded, higher precendence than `hidden` tag. This is the reflection name (aka. EnglishMemberName).

Parcel.Neo.Base.Framework.ToolboxIndexer.TypeToolboxDefinition.AllConst

Whether we should treat all instance members as "const" from the type.

Parcel.Neo.Base.Framework.ToolboxIndexer.TypeToolboxDefinition.categoryOverride

Optionally override the category name instead of using the default conventional category name

Parcel.Neo.Base.Framework.ToolboxIndexer.FrontendToolboxDefinition

Represent a toolbox that's strongly typed using framework classes with explicit node definitions as objects. This is the most customizable.

Parcel.Neo.Base.Framework.ToolboxIndexer.FrontendToolboxDefinition.#ctor()

Represent a toolbox that's strongly typed using framework classes with explicit node definitions as objects. This is the most customizable.

Parcel.Neo.Base.Framework.ToolboxIndexer.SpecificToolboxEndPointDefinition

Expose a very specific member of a specified type to target toolbox.

Parameters

NameDescriptionDefault
ToolboxName Toolbox
CategoryName Category within toolbox
ProvidingType Type with provided member
MemberName Member name

Parcel.Neo.Base.Framework.ToolboxIndexer.SpecificToolboxEndPointDefinition.#ctor()

Expose a very specific member of a specified type to target toolbox.

Parameters

NameDescriptionDefault
ToolboxName Toolbox
CategoryName Category within toolbox
ProvidingType Type with provided member
MemberName Member name

Parcel.Neo.Base.Framework.ToolboxIndexer.SpecificToolboxEndPointDefinition.ToolboxName

Toolbox

Parcel.Neo.Base.Framework.ToolboxIndexer.SpecificToolboxEndPointDefinition.CategoryName

Category within toolbox

Parcel.Neo.Base.Framework.ToolboxIndexer.SpecificToolboxEndPointDefinition.ProvidingType

Type with provided member

Parcel.Neo.Base.Framework.ToolboxIndexer.SpecificToolboxEndPointDefinition.MemberName

Member name

Parcel.Neo.Base.Framework.ToolboxIndexer.ProceduralContextBaseTypeDefinition

A type that can be used as base type in procedural contexts.

Parameters

NameDescriptionDefault
ToolboxName
Type

Parcel.Neo.Base.Framework.ToolboxIndexer.ProceduralContextBaseTypeDefinition.#ctor()

A type that can be used as base type in procedural contexts.

Parameters

NameDescriptionDefault
ToolboxName
Type

Parcel.Neo.Base.Framework.ToolboxIndexer.ProceduralContextBaseTypeDefinition.ToolboxName

Parcel.Neo.Base.Framework.ToolboxIndexer.ProceduralContextBaseTypeDefinition.Type

Parcel.Neo.Base.Framework.ToolboxIndexer.RegisterPackagesToBeIndexed()

Remarks

Notie this is necessary as a separate step for the purpose of framework runtime management, because actual indexing is expensive and we want to make sure everything is registered before going ahead and indexing the tools.

Parcel.Neo.Base.Framework.ToolboxIndexer.ProceduralContextTypesDefinitions

Some class/type based node libraries.

Parcel.Neo.Base.Framework.ToolboxIndexer.ProceduralContextProcessorNodeTypesDefinitions

Some builtin/framework-level procedural context nodes.

Parcel.Neo.Base.Framework.ToolboxIndexer.ToolboxSorted

Performs sorting based on various attributes and disects into categories

Parcel.Neo.Base.Framework.ToolboxIndexer.SortedToolboxes

Parcel.Neo.Base.Framework.ToolboxIndexer.SearchProcessorNode()

Search for specific processor node's definition.

Parameters

NameDescriptionDefault
nodeType Processor node type.

Returns

Parcel.Neo.Base.Framework.ToolboxIndexer.TryLoadTool()

(Experimental) Load a function from MiniParcel style command arguments, e.g. "RandomDatasets.GetPopulationData 100 2024-09-05"

Parcel.Neo.Base.Framework.ToolboxIndexer.TryLoadTool()

Loads a tool from a resource identifier (Serialization Use).

Parcel.Neo.Base.Framework.ToolboxIndexer.IndexToolboxes

Main routine to actually load ToolboxNodeExport from various registered definitions.

Parcel.Neo.Base.Framework.ToolboxIndexer.GetImplicitConverters()

Equivalent to constructors; Handles Implicit Constructor, like `public static implicit operator EndpointResponse(string body) => new(body, 200, DetermineHeuristicType(body));`

Parcel.Neo.Base.Framework.ToolboxIndexer.GetInstanceMethods()

Remarks

Including both regular methods, and operators and properties.

Parcel.Neo.Base.Framework.ToolboxIndexer.GetPropertyFromMethod()

Remarks

We cannot just do simply method.DeclaringType?.GetProperties().FirstOrDefault(prop => prop.GetSetMethod()?.Name == method.Name || prop.GetGetMethod()?.Name == method.Name) because there might be multiple properties with the same name, as in the case of indexer property

Parcel.Neo.Base.Framework.ToolboxIndexer.FilterMatchesNode()

Tests whether a node is matched by the filter items.

Parcel.Neo.Base.Framework.ToolboxNodeExport

Provides description on the functional/procedural node as exposed on the GUI from a selection list.

Remarks

Pending sorting out the relations between ToolboxNodeExport.ImplementationDescriptor and ToolboxNodeExport.Method as related to implementation type

Parcel.Neo.Base.Framework.ToolboxNodeExport.Tooltip

Documentation of node in human-readable text

Parcel.Neo.Base.Framework.ToolboxNodeExport.ImplementationDescriptor

Provides detailed connector layout and other node-appearance related information.

Parcel.Neo.Base.Framework.ToolboxNodeExport.IdentificationKey

This is the identifying information for functional node description

Parcel.Neo.Base.Framework.ToolboxNodeExport.DescriptorsCache

Cached compiled/resolved callable representation

Parcel.Neo.Base.Framework.ToolboxNodeExport.GetCache

Retrieve or create cache.

Parcel.Neo.Base.Framework.ToolboxNodeExport.#ctor()

Create a functional node from a callabnle.

Parameters

NameDescriptionDefault
name
method

Parcel.Neo.Base.Framework.ToolboxNodeExport.#ctor()

Create a functional node from a processor.

Parameters

NameDescriptionDefault
name
type

Parcel.Neo.Base.Framework.ToolboxNodeExport.#ctor()

Used for GUI/graph editor exposed functions as Toolbox Node which may not necessarily corresponding to true nodes, but simply summons graph editor functions.

Parcel.Neo.Base.Framework.ToolboxNodeExport.Execute

Provides standalone one-shot execution of a node tool.

Parcel.Neo.Base.Framework.ToolboxNodeExport.GetArgumentsListSimple

Simple comma seperated pring-friendly list of arguments identified with names, e.g. `Components, Background, Theme`

Parcel.Neo.Base.Framework.ToolboxNodeExport.GetArgumentsListFull()

Simple comma seperated pring-friendly list of arguments identified with names and types, e.g. `components:AppComponent[], background:String, theme:String`

Remarks

This function is specifically designed for use in FunctionsTray and the output display format may not be universal for other uses. TODO: Merge ArgumentsListFull and ArgumentsListSimple with accessors using a single MethodArgument definition and an array of MethodArgument as collection reference; Also it looks like the intended function here can be merged with FunctionalNodeDescription

System.Text.RegularExpressions.Generated.NodeTargetPathStructureProtocolSyntax_0

Custom System.Text.RegularExpressions.Regex-derived type for the NodeTargetPathStructureProtocolSyntax method.

System.Text.RegularExpressions.Generated.NodeTargetPathStructureProtocolSyntax_0.Instance

Cached, thread-safe singleton instance.

System.Text.RegularExpressions.Generated.NodeTargetPathStructureProtocolSyntax_0.#ctor

Initializes the instance.

System.Text.RegularExpressions.Generated.NodeTargetPathStructureProtocolSyntax_0.RunnerFactory

Provides a factory for creating System.Text.RegularExpressions.RegexRunner instances to be used by methods on System.Text.RegularExpressions.Regex.

System.Text.RegularExpressions.Generated.NodeTargetPathStructureProtocolSyntax_0.RunnerFactory.CreateInstance

System.Text.RegularExpressions.Generated.NodeTargetPathStructureProtocolSyntax_0.RunnerFactory.Runner

Provides the runner that contains the custom logic implementing the specified regular expression.

System.Text.RegularExpressions.Generated.NodeTargetPathStructureProtocolSyntax_0.RunnerFactory.Runner.Scan()

Scan the inputSpan starting from base.runtextstart for the next match.

Parameters

NameDescriptionDefault
inputSpan The text being scanned by the regular expression.

System.Text.RegularExpressions.Generated.NodeTargetPathStructureProtocolSyntax_0.RunnerFactory.Runner.TryFindNextPossibleStartingPosition()

Search inputSpan starting from base.runtextpos for the next location a match could possibly start.

Parameters

NameDescriptionDefault
inputSpan The text being scanned by the regular expression.

Returns

true if a possible match was found; false if no more matches are possible.

System.Text.RegularExpressions.Generated.NodeTargetPathStructureProtocolSyntax_0.RunnerFactory.Runner.TryMatchAtCurrentPosition()

Determine whether inputSpan at base.runtextpos is a match for the regular expression.

Parameters

NameDescriptionDefault
inputSpan The text being scanned by the regular expression.

Returns

true if the regular expression matches at the current position; otherwise, false.

System.Text.RegularExpressions.Generated.Utilities

Helper methods used by generated System.Text.RegularExpressions.Regex-derived implementations.

System.Text.RegularExpressions.Generated.Utilities.s_defaultTimeout

Default timeout value set in System.AppContext, or System.Text.RegularExpressions.Regex.InfiniteMatchTimeout if none was set.

System.Text.RegularExpressions.Generated.Utilities.s_hasTimeout

System.Text.RegularExpressions.Generated.Utilities.StackPop()

Pops 2 values from the backtracking stack.

System.Text.RegularExpressions.Generated.Utilities.StackPush()

Pushes 1 value onto the backtracking stack.

System.Text.RegularExpressions.Generated.Utilities.StackPush()

Pushes 2 values onto the backtracking stack.