rsnarsna
feat(alli-backend): Wave-1 standardization, standalone sys.env node & vault crypto, and DEC-014 security hardening
8628c98 Download specs/nodes/oop.json from Rsnarsna/auto: direct link, hf CLI and curl.
- Browser
- Download file 27.3 kB
-
https://huggingface.co/spaces/Rsnarsna/auto/resolve/main/specs/nodes/oop.json
- Command line
-
hf download hf://spaces/Rsnarsna/auto/specs/nodes/oop.json
-
curl -L -o oop.json https://huggingface.co/spaces/Rsnarsna/auto/resolve/main/specs/nodes/oop.json
27.3 kB
[
{
"id": "function.def",
"type": "function.def",
"label": "Function Definition",
"category": "Functions & Scope",
"version": "1.0.0",
"description": "Define a named, reusable function.",
"icon": "FunctionSquare",
"inputs": [],
"parameters": [
{
"id": "func_name",
"name": "Function Name",
"type": "string",
"default": "my_func",
"description": "",
"options": null,
"min_value": null,
"max_value": null,
"required": true,
"step": null,
"precision": null,
"regex": null,
"enum_values": null,
"widget": null,
"is_identifier": null
},
{
"id": "params_list",
"name": "Parameters",
"type": "string",
"default": "x",
"description": "",
"options": null,
"min_value": null,
"max_value": null,
"required": true,
"step": null,
"precision": null,
"regex": null,
"enum_values": null,
"widget": null,
"is_identifier": null
},
{
"id": "return_expr",
"name": "Return Expression",
"type": "string",
"default": "x * 2",
"description": "",
"options": null,
"min_value": null,
"max_value": null,
"required": true,
"step": null,
"precision": null,
"regex": null,
"enum_values": null,
"widget": null,
"is_identifier": null
}
],
"outputs": [
{
"id": "callable_fn",
"name": "Function",
"type": "callable",
"required": true,
"multiple": false,
"kind": "data",
"default_value": null,
"description": "",
"is_var_positional": false,
"is_var_keyword": false,
"keyword_key": null
},
{
"id": "func_ref",
"name": "Function Reference",
"type": "callable",
"required": true,
"multiple": false,
"kind": "data",
"default_value": null,
"description": "",
"is_var_positional": false,
"is_var_keyword": false,
"keyword_key": null
},
{
"id": "out",
"name": "Output",
"type": "any",
"required": true,
"multiple": false,
"kind": "data",
"default_value": null,
"description": "",
"is_var_positional": false,
"is_var_keyword": false,
"keyword_key": null
}
],
"settings": {
"timeout_seconds": 5.0,
"retry_count": 0,
"fallback_on_error": null,
"cache_policy": "session",
"continue_on_error": false,
"execute_once": false
},
"validation": null,
"execution": null,
"codegen": {
"template": "def {func_name}({params_list}):\n return {return_expr}",
"imports": [],
"requirements": [],
"variable_prefix": null
},
"dependencies": [],
"docs": {
"summary": "User-defined functions with parameter binding.",
"description": "Defines a reusable Python callable function with explicit parameter bindings and expression body.",
"doc_url": "https://docs.python.org/3/tutorial/controlflow.html#defining-functions",
"examples": [
{
"title": "Double Function Definition",
"inputs": {},
"parameters": {
"func_name": "double",
"params_list": "x",
"return_expr": "x * 2"
},
"expected_output": {},
"code_snippet": "def double(x):\n return x * 2"
}
],
"complexity": "O(1)",
"time_complexity": "O(1)",
"space_complexity": "O(1)",
"complexity_assumptions": "Function closure binding",
"exceptions": [
"SyntaxError"
],
"possible_exceptions": [
{
"type": "SyntaxError",
"condition": "Invalid function name or parameter list syntax",
"severity": "error"
}
],
"since_version": "1.0.0"
},
"verification": {
"node_kind": "control_flow",
"is_deterministic": true,
"side_effects": [],
"minimal_config": {
"func_name": "f",
"params_list": "x",
"return_expr": "x"
},
"test_inputs": {},
"expected_outputs": {},
"expected_errors": null,
"capability_states": {
"extracted": true,
"node_generated": true,
"runtime_supported": true,
"codegen_supported": true
}
},
"capability_states": null,
"allow_var_positional": false,
"allow_var_keyword": false,
"var_positional_name": "args",
"var_keyword_name": "kwargs"
},
{
"id": "function.call",
"type": "function.call",
"label": "Function Call",
"category": "Functions & Scope",
"version": "1.0.0",
"description": "Invoke a defined function with arguments.",
"icon": "PlayCircle",
"inputs": [
{
"id": "callable_fn",
"name": "Callable",
"type": "callable",
"required": false,
"multiple": false,
"kind": "data",
"default_value": null,
"description": "",
"is_var_positional": false,
"is_var_keyword": false,
"keyword_key": null
},
{
"id": "func_in",
"name": "Function Input",
"type": "callable",
"required": false,
"multiple": false,
"kind": "data",
"default_value": null,
"description": "",
"is_var_positional": false,
"is_var_keyword": false,
"keyword_key": null
},
{
"id": "arg",
"name": "Argument",
"type": "any",
"required": false,
"multiple": false,
"kind": "data",
"default_value": null,
"description": "",
"is_var_positional": false,
"is_var_keyword": false,
"keyword_key": null
},
{
"id": "arg_2",
"name": "Argument 2",
"type": "any",
"required": false,
"multiple": false,
"kind": "data",
"default_value": null,
"description": "",
"is_var_positional": false,
"is_var_keyword": false,
"keyword_key": null
}
],
"parameters": [
{
"id": "func_name",
"name": "Function Name",
"type": "string",
"default": "my_func",
"description": "",
"options": null,
"min_value": null,
"max_value": null,
"required": true,
"step": null,
"precision": null,
"regex": null,
"enum_values": null,
"widget": null,
"is_identifier": null
}
],
"outputs": [
{
"id": "result",
"name": "Result",
"type": "any",
"required": true,
"multiple": false,
"kind": "data",
"default_value": null,
"description": "",
"is_var_positional": false,
"is_var_keyword": false,
"keyword_key": null
}
],
"settings": {
"timeout_seconds": 5.0,
"retry_count": 0,
"fallback_on_error": null,
"cache_policy": "session",
"continue_on_error": false,
"execute_once": false
},
"validation": null,
"execution": null,
"codegen": {
"template": "{result} = {func_name}({arg})",
"imports": [],
"requirements": [],
"variable_prefix": null
},
"dependencies": [],
"docs": {
"summary": "Callable invocation.",
"description": "Invokes a Python callable or registered function with argument parameters and receives the return value.",
"doc_url": "https://docs.python.org/3/reference/expressions.html#calls",
"examples": [
{
"title": "Function Invocation",
"inputs": {
"arg": 5
},
"parameters": {
"func_name": "my_func"
},
"expected_output": {
"result": 10
},
"code_snippet": "result = my_func(5)"
}
],
"complexity": "O(1)",
"time_complexity": "O(1)",
"space_complexity": "O(1)",
"complexity_assumptions": "Invocation overhead is O(1); total complexity depends on the called function body",
"exceptions": [
"TypeError",
"NameError"
],
"possible_exceptions": [
{
"type": "TypeError",
"condition": "Passed object is not callable or argument count mismatch",
"severity": "error"
},
{
"type": "NameError",
"condition": "Referenced function name is undefined",
"severity": "error"
}
],
"since_version": "1.0.0"
},
"verification": {
"node_kind": "value_producer",
"is_deterministic": true,
"side_effects": [],
"minimal_config": {
"func_name": "my_func"
},
"test_inputs": {
"arg": 5
},
"expected_outputs": {
"result": 10
},
"expected_errors": null,
"capability_states": {
"extracted": true,
"node_generated": true,
"runtime_supported": true,
"codegen_supported": true
}
},
"capability_states": null,
"allow_var_positional": false,
"allow_var_keyword": false,
"var_positional_name": "args",
"var_keyword_name": "kwargs"
},
{
"id": "oop.class_def",
"type": "oop.class_def",
"label": "Class Definition",
"category": "Object-Oriented",
"version": "1.0.0",
"description": "Defines an Object-Oriented blueprint with constructor attributes and declared methods.",
"icon": "Box",
"inputs": [],
"parameters": [
{
"id": "class_name",
"name": "Class Name",
"type": "string",
"default": "Student",
"description": "",
"options": null,
"min_value": null,
"max_value": null,
"required": true,
"step": null,
"precision": null,
"regex": null,
"enum_values": null,
"widget": null,
"is_identifier": null
},
{
"id": "attributes",
"name": "Constructor Attributes",
"type": "string",
"default": "name, score",
"description": "",
"options": null,
"min_value": null,
"max_value": null,
"required": true,
"step": null,
"precision": null,
"regex": null,
"enum_values": null,
"widget": null,
"is_identifier": null
},
{
"id": "methods",
"name": "Declared Methods",
"type": "string",
"default": "add_bonus",
"description": "",
"options": null,
"min_value": null,
"max_value": null,
"required": true,
"step": null,
"precision": null,
"regex": null,
"enum_values": null,
"widget": null,
"is_identifier": null
},
{
"id": "docstring",
"name": "Docstring",
"type": "string",
"default": "Represents a class blueprint.",
"description": "",
"options": null,
"min_value": null,
"max_value": null,
"required": true,
"step": null,
"precision": null,
"regex": null,
"enum_values": null,
"widget": null,
"is_identifier": null
}
],
"outputs": [
{
"id": "class_ref",
"name": "Class Reference",
"type": "any",
"required": true,
"multiple": false,
"kind": "data",
"default_value": null,
"description": "",
"is_var_positional": false,
"is_var_keyword": false,
"keyword_key": null
},
{
"id": "class_name",
"name": "Class Name",
"type": "str",
"required": true,
"multiple": false,
"kind": "data",
"default_value": null,
"description": "",
"is_var_positional": false,
"is_var_keyword": false,
"keyword_key": null
},
{
"id": "out",
"name": "Pass-Through",
"type": "any",
"required": true,
"multiple": false,
"kind": "data",
"default_value": null,
"description": "",
"is_var_positional": false,
"is_var_keyword": false,
"keyword_key": null
}
],
"settings": {
"timeout_seconds": 5.0,
"retry_count": 0,
"fallback_on_error": null,
"cache_policy": "session",
"continue_on_error": false,
"execute_once": false
},
"validation": null,
"execution": null,
"codegen": {
"template": "class {class_name}:\n def __init__(self, {attributes}):\n pass",
"imports": [],
"requirements": [],
"variable_prefix": null
},
"dependencies": [],
"docs": {
"summary": "Class definition blueprint.",
"description": "Creates a class namespace providing object blueprints and constructor binding.",
"doc_url": "https://docs.python.org/3/tutorial/classes.html",
"examples": [
{
"title": "Class Def",
"inputs": {},
"parameters": {
"class_name": "Student",
"attributes": "name, score"
},
"expected_output": {
"class_name": "Student"
},
"code_snippet": "class Student:\n def __init__(self, name, score):\n pass"
}
],
"complexity": "O(1)",
"time_complexity": "O(1)",
"space_complexity": "O(1)",
"complexity_assumptions": null,
"exceptions": [],
"possible_exceptions": [],
"since_version": "1.0.0"
},
"verification": {
"node_kind": "value_producer",
"is_deterministic": true,
"side_effects": [],
"minimal_config": {
"class_name": "Student",
"attributes": "name, score"
},
"test_inputs": {},
"expected_outputs": {
"class_name": "Student"
},
"expected_errors": null,
"capability_states": {
"extracted": true,
"node_generated": true,
"runtime_supported": true,
"codegen_supported": true
}
},
"capability_states": null,
"allow_var_positional": false,
"allow_var_keyword": false,
"var_positional_name": "args",
"var_keyword_name": "kwargs"
},
{
"id": "oop.instance",
"type": "oop.instance",
"label": "Create Instance",
"category": "Object-Oriented",
"version": "1.0.0",
"description": "Instantiate an object from a Class Definition with constructor arguments.",
"icon": "Layers",
"inputs": [
{
"id": "class_in",
"name": "Class Blueprint",
"type": "any",
"required": false,
"multiple": false,
"kind": "data",
"default_value": null,
"description": "",
"is_var_positional": false,
"is_var_keyword": false,
"keyword_key": null
},
{
"id": "arg_1",
"name": "Argument 1",
"type": "any",
"required": false,
"multiple": false,
"kind": "data",
"default_value": null,
"description": "",
"is_var_positional": false,
"is_var_keyword": false,
"keyword_key": null
},
{
"id": "arg_2",
"name": "Argument 2",
"type": "any",
"required": false,
"multiple": false,
"kind": "data",
"default_value": null,
"description": "",
"is_var_positional": false,
"is_var_keyword": false,
"keyword_key": null
}
],
"parameters": [
{
"id": "class_name",
"name": "Fallback Class Name",
"type": "string",
"default": "Student",
"description": "",
"options": null,
"min_value": null,
"max_value": null,
"required": true,
"step": null,
"precision": null,
"regex": null,
"enum_values": null,
"widget": null,
"is_identifier": null
},
{
"id": "arg_1_val",
"name": "Default Arg 1",
"type": "expression",
"default": "Alice",
"description": "",
"options": null,
"min_value": null,
"max_value": null,
"required": true,
"step": null,
"precision": null,
"regex": null,
"enum_values": null,
"widget": null,
"is_identifier": null
},
{
"id": "arg_2_val",
"name": "Default Arg 2",
"type": "expression",
"default": 85,
"description": "",
"options": null,
"min_value": null,
"max_value": null,
"required": true,
"step": null,
"precision": null,
"regex": null,
"enum_values": null,
"widget": null,
"is_identifier": null
}
],
"outputs": [
{
"id": "instance",
"name": "Object Instance",
"type": "object",
"required": true,
"multiple": false,
"kind": "data",
"default_value": null,
"description": "",
"is_var_positional": false,
"is_var_keyword": false,
"keyword_key": null
},
{
"id": "result",
"name": "Instance Alias",
"type": "object",
"required": true,
"multiple": false,
"kind": "data",
"default_value": null,
"description": "",
"is_var_positional": false,
"is_var_keyword": false,
"keyword_key": null
},
{
"id": "val",
"name": "Value Alias",
"type": "any",
"required": true,
"multiple": false,
"kind": "data",
"default_value": null,
"description": "",
"is_var_positional": false,
"is_var_keyword": false,
"keyword_key": null
},
{
"id": "out",
"name": "Pass-Through",
"type": "any",
"required": true,
"multiple": false,
"kind": "data",
"default_value": null,
"description": "",
"is_var_positional": false,
"is_var_keyword": false,
"keyword_key": null
}
],
"settings": {
"timeout_seconds": 5.0,
"retry_count": 0,
"fallback_on_error": null,
"cache_policy": "session",
"continue_on_error": false,
"execute_once": false
},
"validation": null,
"execution": null,
"codegen": {
"template": "{instance} = {class_name}({arg_1}, {arg_2})",
"imports": [],
"requirements": [],
"variable_prefix": null
},
"dependencies": [],
"docs": {
"summary": "Instantiates a new instance of the class.",
"description": "Constructs an instance of a specified class, passing initialization arguments to __init__.",
"doc_url": "https://docs.python.org/3/tutorial/classes.html#class-objects",
"examples": [
{
"title": "Instantiate",
"inputs": {
"arg_1": "Alice",
"arg_2": 90
},
"parameters": {
"class_name": "Student"
},
"expected_output": {
"result": {
"name": "Alice",
"score": 90
}
},
"code_snippet": "student = Student('Alice', 90)"
}
],
"complexity": "O(1)",
"time_complexity": "O(1)",
"space_complexity": "O(1)",
"complexity_assumptions": null,
"exceptions": [],
"possible_exceptions": [],
"since_version": "1.0.0"
},
"verification": {
"node_kind": "value_producer",
"is_deterministic": true,
"side_effects": [],
"minimal_config": {
"class_name": "Student"
},
"test_inputs": {
"arg_1": "Alice",
"arg_2": 90
},
"expected_outputs": {
"result": {
"name": "Alice",
"score": 90
}
},
"expected_errors": null,
"capability_states": {
"extracted": true,
"node_generated": true,
"runtime_supported": true,
"codegen_supported": true
}
},
"capability_states": null,
"allow_var_positional": false,
"allow_var_keyword": false,
"var_positional_name": "args",
"var_keyword_name": "kwargs"
},
{
"id": "oop.method_call",
"type": "oop.method_call",
"label": "Method Call",
"category": "Object-Oriented",
"version": "1.0.0",
"description": "Invoke an object method with arguments, return method result, and update instance state.",
"icon": "Play",
"inputs": [
{
"id": "instance_in",
"name": "Target Instance",
"type": "object",
"required": true,
"multiple": false,
"kind": "data",
"default_value": null,
"description": "",
"is_var_positional": false,
"is_var_keyword": false,
"keyword_key": null
},
{
"id": "arg",
"name": "Method Argument",
"type": "any",
"required": false,
"multiple": false,
"kind": "data",
"default_value": null,
"description": "",
"is_var_positional": false,
"is_var_keyword": false,
"keyword_key": null
},
{
"id": "arg_2",
"name": "Method Argument 2",
"type": "any",
"required": false,
"multiple": false,
"kind": "data",
"default_value": null,
"description": "",
"is_var_positional": false,
"is_var_keyword": false,
"keyword_key": null
}
],
"parameters": [
{
"id": "method_name",
"name": "Method Name",
"type": "string",
"default": "add_bonus",
"description": "",
"options": null,
"min_value": null,
"max_value": null,
"required": true,
"step": null,
"precision": null,
"regex": null,
"enum_values": null,
"widget": null,
"is_identifier": null
},
{
"id": "attribute_to_modify",
"name": "State Attribute",
"type": "string",
"default": "score",
"description": "",
"options": null,
"min_value": null,
"max_value": null,
"required": true,
"step": null,
"precision": null,
"regex": null,
"enum_values": null,
"widget": null,
"is_identifier": null
},
{
"id": "operation",
"name": "Mutation Mode",
"type": "select",
"default": "increment",
"description": "",
"options": [
{
"value": "increment",
"label": "Increment Attribute (+= arg)"
},
{
"value": "set",
"label": "Set Attribute (= arg)"
},
{
"value": "get",
"label": "Get Attribute / Read-only"
},
{
"value": "call_method",
"label": "Call Method"
}
],
"min_value": null,
"max_value": null,
"required": true,
"step": null,
"precision": null,
"regex": null,
"enum_values": null,
"widget": null,
"is_identifier": null
},
{
"id": "default_arg",
"name": "Default Argument",
"type": "expression",
"default": 15,
"description": "",
"options": null,
"min_value": null,
"max_value": null,
"required": true,
"step": null,
"precision": null,
"regex": null,
"enum_values": null,
"widget": null,
"is_identifier": null
}
],
"outputs": [
{
"id": "instance_out",
"name": "Updated Instance",
"type": "object",
"required": true,
"multiple": false,
"kind": "data",
"default_value": null,
"description": "",
"is_var_positional": false,
"is_var_keyword": false,
"keyword_key": null
},
{
"id": "result",
"name": "Method Result",
"type": "any",
"required": true,
"multiple": false,
"kind": "data",
"default_value": null,
"description": "",
"is_var_positional": false,
"is_var_keyword": false,
"keyword_key": null
},
{
"id": "out",
"name": "Pass-Through",
"type": "any",
"required": true,
"multiple": false,
"kind": "data",
"default_value": null,
"description": "",
"is_var_positional": false,
"is_var_keyword": false,
"keyword_key": null
}
],
"settings": {
"timeout_seconds": 5.0,
"retry_count": 0,
"fallback_on_error": null,
"cache_policy": "session",
"continue_on_error": false,
"execute_once": false
},
"validation": null,
"execution": null,
"codegen": {
"template": "{result} = {instance_in}.{method_name}({arg})",
"imports": [],
"requirements": [],
"variable_prefix": null
},
"dependencies": [],
"docs": {
"summary": "Invoke instance method.",
"description": "Calls a declared method on the target instance, updating internal attribute state.",
"doc_url": "https://docs.python.org/3/tutorial/classes.html#method-objects",
"examples": [
{
"title": "Method Call",
"inputs": {
"instance_in": {
"score": 80
},
"arg": 10
},
"parameters": {
"method_name": "add_bonus",
"attribute_to_modify": "score",
"operation": "increment"
},
"expected_output": {
"result": 90
},
"code_snippet": "result = student.add_bonus(10)"
}
],
"complexity": "O(1)",
"time_complexity": "O(1)",
"space_complexity": "O(1)",
"complexity_assumptions": null,
"exceptions": [],
"possible_exceptions": [],
"since_version": "1.0.0"
},
"verification": {
"node_kind": "value_producer",
"is_deterministic": true,
"side_effects": [],
"minimal_config": {
"method_name": "add_bonus",
"attribute_to_modify": "score",
"operation": "increment"
},
"test_inputs": {
"instance_in": {
"score": 80
},
"arg": 10
},
"expected_outputs": {
"result": 90
},
"expected_errors": null,
"capability_states": {
"extracted": true,
"node_generated": true,
"runtime_supported": true,
"codegen_supported": true
}
},
"capability_states": null,
"allow_var_positional": false,
"allow_var_keyword": false,
"var_positional_name": "args",
"var_keyword_name": "kwargs"
}
]
[
{
"id": "function.def",
"type": "function.def",
"label": "Function Definition",
"category": "Functions & Scope",
"version": "1.0.0",
"description": "Define a named, reusable function.",
"icon": "FunctionSquare",
"inputs": [],
"parameters": [
{
"id": "func_name",
"name": "Function Name",
"type": "string",
"default": "my_func",
"description": "",
"options": null,
"min_value": null,
"max_value": null,
"required": true,
"step": null,
"precision": null,
"regex": null,
"enum_values": null,
"widget": null,
"is_identifier": null
},
{
"id": "params_list",
"name": "Parameters",
"type": "string",
"default": "x",
"description": "",
"options": null,
"min_value": null,
"max_value": null,
"required": true,
"step": null,
"precision": null,
"regex": null,
"enum_values": null,
"widget": null,
"is_identifier": null
},
{
"id": "return_expr",
"name": "Return Expression",
"type": "string",
"default": "x * 2",
"description": "",
"options": null,
"min_value": null,
"max_value": null,
"required": true,
"step": null,
"precision": null,
"regex": null,
"enum_values": null,
"widget": null,
"is_identifier": null
}
],
"outputs": [
{
"id": "callable_fn",
"name": "Function",
"type": "callable",
"required": true,
"multiple": false,
"kind": "data",
"default_value": null,
"description": "",
"is_var_positional": false,
"is_var_keyword": false,
"keyword_key": null
},
{
"id": "func_ref",
"name": "Function Reference",
"type": "callable",
"required": true,
"multiple": false,
"kind": "data",
"default_value": null,
"description": "",
"is_var_positional": false,
"is_var_keyword": false,
"keyword_key": null
},
{
"id": "out",
"name": "Output",
"type": "any",
"required": true,
"multiple": false,
"kind": "data",
"default_value": null,
"description": "",
"is_var_positional": false,