All the functions available are listed in the editor when you copy them into your clipboard from the Lua script part of NPC editing.
At first glance there is no such thing; there's a bunch of fetching functions for weather, time of day, day of the week and season meant to be used in conjunction with logic gates and conditions.
There's a check for 'sunlight' which I'm unsure is actual sunlight or the amount of light in an area within a float ranging from 0 to 1.
There's oddly a function that dictates the cost of the shed plot, one that states if either the shed is locked or unlocked and finally one that displays text when the conditions for it are met, likely used by Gareth when you try to buy the shed from him, which means you could very easily create a NPC that gives you the shed for free when interacted with using their Lua script editor, not that Gareth's AI needs much convincing to do so as well to begin with.
Everything else is just a garbage collector, math operators, tables.
There's however a list of defined 'default' routines that exist innately within the game which are the following;
read_in_bed, sleep, cook_breakfast, eat_breakfast, work, frollic_on_frozen_river (which is one of the example conditions on the default test character, under the condition that the weather is snowy) and finally silverpine_leisure which is the default activity for 'do whatever' that you should default to when you're done with whatever activity you've set for them if you don't want them to be immobile starring at a wall until the next activity comes up.
That's pretty much all there is.
To sum up the situation, the activity script in Lua isn't meant to interact with NPC knowledge, it's merely a list of activities for the NPC to do under different conditions during their day, it isn't dynamic but completely static, and the NPC will just follow it blindly until interrupted by the player in some way.
Basically a schedule to follow that's more or less complex based on what you tell the NPC to do, like staying at home if the weather is cold or rainy, or going every now and then to visit a certain NPC by walking to their house every tuesday, things like that.
The gossip system is part of a dynamic set of instructions that trigger after the player is done interacting directly with a NPC, and it isn't elaborate in the slightest as far as I know, the NPC just stores a gossip as a loose memory in the NPCMemories nmem file, and acts upon it whenever it is convenient, it's completely unrelated to routines, in fact you can open that nmem file and erase the line that says 'X Npc told me that Player did X' and the rumor vanishes permanently from their memory as if it never happened once you reimport it.
If you were hoping for this game's NPCs to be more flexible than that, and for what you say or do to change their habits, I'm sad to say, and can confirm as I've tried to do so myself even before the NPC editing tools were put in game;
There is no way, and I mean absolutely none, to modify the habits of a NPC from their usual scheduling using dialogue alone, they'll just keep doing what they do whatever you tell them or convince them to do, with the only exception of following you, gossiping, trying to arrest or murder you, and inviting Mirel to live with you. And even that has its limits; for instance if you were to try and convince Mirel to follow you while her activity dictates that she must return to Thalassar, some invisible voice will force her AI to comply and cut off the conversation before returning to her usual programming. It isn't as elaborate as what you might expect.