ONE social:rules
← Receivers

social:rules

social family

mcp

Read or set a workspace's auto-post rules: which networks may post without a tap, the most posts a day per network, words that always ask a person (names, products), whether a price or a discount always asks (on by default), quiet hours and the time zone they count in. With no rules every post waits for a person. Setting them is a person with the owner or admin seat — an agent or a bare key is refused. Every publish door asks mayAutoPost (lib/social-rules.ts), which fails closed.

Effect
ask
Awaits an outcome — the call returns the response below.
Caller
update_group
The class of authority the caller must already hold, decided from the attested context with no round trip.
Cost
free
What one call costs, so you can budget before acting.
Reversible
yes
The effect can be undone by a later call.
Idempotent
yes
Safe to retry as-is.

Send it with your agent

One click hands your coding agent a prompt that registers the substrate, reads this contract, and makes the call. Launch opens the app; the others copy the prompt.

Claude Code
Codex
Cursor
Gemini CLI
Claude Desktop
ChatGPT
curl -X POST https://one.ie/api/ask/social:rules \
  -H "Authorization: Bearer $ONE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data": { "action": <get | set>, "workspace": <string>, "rules": <object> }}'

The key is never in a link. npx -y @oneie/cli login writes it to ~/.config/oneie/key on your machine.

Request

Validated before dispatch — an invalid payload is refused with the fix, never half-applied.

  • action get | set optional Default get unless rules are given.
  • workspace string optional Defaults to the caller's own; the caller is walked to it.
  • rules object optional set: the whole rule set (fields left out take their defaults).

Response

What comes back from the call.

  • ok boolean
  • error string forbidden: … · bad_rules: …
  • workspace string
  • set boolean False when the workspace has no rules yet (the defaults are shown).
  • rules object

Traffic

Every call to social:rules, counted where it is dispatched — over HTTP or in-process alike. Aggregate only — no actor, no payload, no workspace.

Counting…

Wiring

Every place in the open source that names social:rules, and the file that answers it. Read from the tree at build time — a receiver is reached by NAME through one door, so there is no import edge to follow and a grep is the honest shape of the question. Structure, not volume — the count is in Traffic above.

Called from

API route 1
  • one.ie/web/src/lib/receiver-index.generated.ts:464
CLI 1
  • packages/cli/src/social.ts:442
SDK 1
  • packages/sdk/src/social.ts:46
→
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "action": {
      "description": "Default get unless rules are given.",
      "type": "string",
      "enum": [
        "get",
        "set"
      ]
    },
    "workspace": {
      "description": "Defaults to the caller's own; the caller is walked to it.",
      "type": "string"
    },
    "rules": {
      "description": "set: the whole rule set (fields left out take their defaults).",
      "type": "object",
      "properties": {
        "autoNetworks": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "dailyCap": {
          "description": "{ network: posts a day }, 0 to 50. Default 3.",
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "type": "number"
          }
        },
        "askWords": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "askOnPrices": {
          "type": "boolean"
        },
        "askOnDiscounts": {
          "type": "boolean"
        },
        "quietHours": {
          "description": "Local hours 0–23; start > end wraps past midnight.",
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "start": {
                  "type": "number"
                },
                "end": {
                  "type": "number"
                }
              },
              "required": [
                "start",
                "end"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "timezone": {
          "description": "IANA zone, e.g. Asia/Bangkok. Default UTC.",
          "type": "string"
        }
      }
    }
  }
}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean"
    },
    "error": {
      "description": "forbidden: … · bad_rules: …",
      "type": "string"
    },
    "workspace": {
      "type": "string"
    },
    "set": {
      "description": "False when the workspace has no rules yet (the defaults are shown).",
      "type": "boolean"
    },
    "rules": {
      "type": "object",
      "properties": {
        "version": {
          "type": "number"
        },
        "autoNetworks": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "dailyCap": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "type": "number"
          }
        },
        "askWords": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "askOnPrices": {
          "type": "boolean"
        },
        "askOnDiscounts": {
          "type": "boolean"
        },
        "quietHours": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "start": {
                  "type": "number"
                },
                "end": {
                  "type": "number"
                }
              },
              "required": [
                "start",
                "end"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "timezone": {
          "type": "string"
        },
        "updatedBy": {
          "type": "string"
        },
        "updatedAt": {
          "type": "number"
        }
      },
      "required": [
        "version",
        "autoNetworks",
        "dailyCap",
        "askWords",
        "askOnPrices",
        "askOnDiscounts",
        "quietHours",
        "timezone"
      ]
    }
  },
  "required": [
    "ok"
  ]
}