harn-stdlib 0.8.26

Embedded Harn standard library source catalog
Documentation
// std/agent_state — durable session-scoped state helpers.
//
// Import: import "std/agent_state"
/**
 * agent_state_init.
 *
 * @effects: [agent]
 * @allocation: heap
 * @errors: []
 * @api_stability: stable
 * @example: agent_state_init(root, options)
 */
pub fn agent_state_init(root, options) {
  return __agent_state_init(root, options)
}

/**
 * agent_state_resume.
 *
 * @effects: [agent]
 * @allocation: heap
 * @errors: []
 * @api_stability: stable
 * @example: agent_state_resume(root, session_id, options)
 */
pub fn agent_state_resume(root, session_id, options) {
  return __agent_state_resume(root, session_id, options)
}

/**
 * agent_state_write.
 *
 * @effects: [agent]
 * @allocation: heap
 * @errors: []
 * @api_stability: stable
 * @example: agent_state_write(handle, key, content)
 */
pub fn agent_state_write(handle, key, content) {
  return __agent_state_write(handle, key, content)
}

/**
 * agent_state_read.
 *
 * @effects: [agent]
 * @allocation: heap
 * @errors: []
 * @api_stability: stable
 * @example: agent_state_read(handle, key)
 */
pub fn agent_state_read(handle, key) {
  return __agent_state_read(handle, key)
}

/**
 * agent_state_list.
 *
 * @effects: [agent]
 * @allocation: heap
 * @errors: []
 * @api_stability: stable
 * @example: agent_state_list(handle)
 */
pub fn agent_state_list(handle) {
  return __agent_state_list(handle)
}

/**
 * agent_state_delete.
 *
 * @effects: [agent]
 * @allocation: heap
 * @errors: []
 * @api_stability: stable
 * @example: agent_state_delete(handle, key)
 */
pub fn agent_state_delete(handle, key) {
  return __agent_state_delete(handle, key)
}

/**
 * agent_state_handoff.
 *
 * @effects: [agent]
 * @allocation: heap
 * @errors: []
 * @api_stability: stable
 * @example: agent_state_handoff(handle, summary)
 */
pub fn agent_state_handoff(handle, summary) {
  return __agent_state_handoff(handle, summary)
}

/**
 * agent_state_handoff_key.
 *
 * @effects: []
 * @allocation: heap
 * @errors: []
 * @api_stability: stable
 * @example: agent_state_handoff_key()
 */
pub fn agent_state_handoff_key() {
  return "__handoff.json"
}