fsanyoto commited on
Commit
301db09
·
verified ·
1 Parent(s): 868b75a

Deploy AIOS web (React glide grid + FastAPI slice)

Browse files
RELEASES.json CHANGED
@@ -1,4 +1,4 @@
1
  {
2
- "current": "66bc671c3",
3
  "releases": []
4
  }
 
1
  {
2
+ "current": "adda9eb1a",
3
  "releases": []
4
  }
VERSION CHANGED
@@ -1 +1 @@
1
- 66bc671c3
 
1
+ adda9eb1a
api/routes_external.py CHANGED
@@ -4091,7 +4091,7 @@ def _preview_external_write(session, name, arguments, *, issue_token=True, execu
4091
  current_revision = copy.deepcopy(plan.get("revision") or {})
4092
  else:
4093
  documents = preview_runtime.changed()
4094
- if name == "requests" and normalised.get("action") in {"answer", "complete"}:
4095
  projected = _request_preview_documents(session, normalised["arguments"]["id"], documents)
4096
  else:
4097
  projected = _public_preview_documents(session, documents)
@@ -4997,7 +4997,12 @@ MCP_INSTRUCTIONS = "\n".join([
4997
  "intelligence.create_wiki publishes a new wiki/ page at once without preview, confirmation or owner approval. "
4998
  "It cannot replace a committed page. Existing wiki edits use intelligence.propose with confirmation and file approval. "
4999
  "Send intent beside action and arguments on every write, including confirm_change. "
5000
- "Reads may send intent. Use 1 to 500 characters explaining why you are making this call.",
 
 
 
 
 
5001
  "5. A refusal (ok: false) names its code and reason. Tell the user the reason. Do not retry "
5002
  "the same call with a wider scope.",
5003
  "6. Never ask for, print or save a credential.",
 
4091
  current_revision = copy.deepcopy(plan.get("revision") or {})
4092
  else:
4093
  documents = preview_runtime.changed()
4094
+ if name == "requests" and normalised.get("action") in {"answer", "complete", "ask_user"}:
4095
  projected = _request_preview_documents(session, normalised["arguments"]["id"], documents)
4096
  else:
4097
  projected = _public_preview_documents(session, documents)
 
4997
  "intelligence.create_wiki publishes a new wiki/ page at once without preview, confirmation or owner approval. "
4998
  "It cannot replace a committed page. Existing wiki edits use intelligence.propose with confirmation and file approval. "
4999
  "Send intent beside action and arguments on every write, including confirm_change. "
5000
+ "Reads may send intent. Use 1 to 500 characters explaining why you are making this call."
5001
+ " Use requests.list_team for teammate names and last-active times, requests.send_message for questions or change proposals, "
5002
+ "requests.check_inbox for incoming requests, and requests.ask_user for recipient Approve or Deny decisions. "
5003
+ "requests.send_message also skips preview and confirmation and shares requests.send's hourly cap and source-access checks. "
5004
+ "A decision needs recipient human confirmation. Approval authorizes the recipient AI only. "
5005
+ "It executes no target write or access grant.",
5006
  "5. A refusal (ok: false) names its code and reason. Tell the user the reason. Do not retry "
5007
  "the same call with a wider scope.",
5008
  "6. Never ask for, print or save a credential.",
api/tool_groups/__init__.py CHANGED
@@ -81,8 +81,8 @@ def groups():
81
  if entry["read"] and entry["destructive"]:
82
  raise ValueError("A read action cannot be destructive")
83
  if not entry["read"] and not entry["confirm"] and (name, key) not in {
84
- ("requests", "send"), ("intelligence", "create_wiki")}:
85
- raise ValueError("Only requests.send and intelligence.create_wiki may write without confirmation")
86
  found[name] = group
87
  return found
88
 
 
81
  if entry["read"] and entry["destructive"]:
82
  raise ValueError("A read action cannot be destructive")
83
  if not entry["read"] and not entry["confirm"] and (name, key) not in {
84
+ ("requests", "send"), ("requests", "send_message"), ("intelligence", "create_wiki")}:
85
+ raise ValueError("Only requests.send, requests.send_message and intelligence.create_wiki may write without confirmation")
86
  found[name] = group
87
  return found
88
 
api/tool_groups/schedules.py CHANGED
@@ -84,7 +84,7 @@ def create(ctx, args):
84
  if sum(key in args for key in ("when", "once_at", "trigger")) != 1:
85
  raise ValueError("Choose one repeat time, one-off time or sync trigger.")
86
  if "text" in args:
87
- if any(key in args for key in ("database", "payload", "words")) or "once_at" not in args:
88
  raise ValueError("Choose a one-off note or a saved query.")
89
  action = {"kind": "reminder", "text": args["text"], "sendWhatsapp": False}
90
  label = args.get("label", args["text"])
@@ -94,12 +94,15 @@ def create(ctx, args):
94
  _database(ctx, args["database"])
95
  action = {"kind": "query", "database": args["database"], "payload": args["payload"],
96
  "words": args["words"], "scope": _scope(ctx)}
 
 
97
  label = args.get("label", args["words"])
98
  config = getattr(session.runtime.tenant, "config", None) or {}
99
  zone = args.get("timezone", config.get("timezone") or "UTC")
100
  timing = ({"cron": _cron_from_phrase(args["when"])} if "when" in args else
101
  {"once_at": args["once_at"]} if "once_at" in args else {"trigger": args["trigger"]})
102
- schedule_id = scheduler.create(session.runtime, session.uname, tz=zone, label=label, action=action, **timing)
 
103
  result = _item(scheduler.get(session.runtime, schedule_id))
104
 
105
  def save_preview(doc):
@@ -171,6 +174,8 @@ GROUP = {
171
  "phrase or five-field cron, once_at for an ISO date and time, or trigger='sync'. "
172
  "A one-off note uses text and once_at. Optional timezone defaults to your workspace. "
173
  "Queries repeat at most once an hour. Query scope comes from your current connection. "
 
 
174
  "Create, pause, resume and delete need confirm_change. Delete needs the exact phrase shown. "
175
  "List and inbox return only your schedules and unread result envelopes. "
176
  "Inbox marks a result read only when you explicitly name its id in shown. "
@@ -179,7 +184,11 @@ GROUP = {
179
  "actions": {
180
  "create": _action(create, {"database": {"type": "string", "minLength": 1}, "payload": _QUERY,
181
  "words": _TEXT, "text": _TEXT, "label": _TEXT, "when": _TEXT,
182
- "once_at": _TEXT, "trigger": {"enum": ["sync"]}, "timezone": _TEXT}, read=False),
 
 
 
 
183
  "list": _action(list_schedules),
184
  "pause": _action(pause, _ID, ("id",), read=False),
185
  "resume": _action(resume, _ID, ("id",), read=False),
 
84
  if sum(key in args for key in ("when", "once_at", "trigger")) != 1:
85
  raise ValueError("Choose one repeat time, one-off time or sync trigger.")
86
  if "text" in args:
87
+ if any(key in args for key in ("database", "payload", "words", "change")) or "once_at" not in args:
88
  raise ValueError("Choose a one-off note or a saved query.")
89
  action = {"kind": "reminder", "text": args["text"], "sendWhatsapp": False}
90
  label = args.get("label", args["text"])
 
94
  _database(ctx, args["database"])
95
  action = {"kind": "query", "database": args["database"], "payload": args["payload"],
96
  "words": args["words"], "scope": _scope(ctx)}
97
+ if "change" in args:
98
+ action["change"] = scheduler.scheduled_change(args["change"])
99
  label = args.get("label", args["words"])
100
  config = getattr(session.runtime.tenant, "config", None) or {}
101
  zone = args.get("timezone", config.get("timezone") or "UTC")
102
  timing = ({"cron": _cron_from_phrase(args["when"])} if "when" in args else
103
  {"once_at": args["once_at"]} if "once_at" in args else {"trigger": args["trigger"]})
104
+ schedule_id = scheduler.create(session.runtime, session.uname, tz=zone, label=label, action=action,
105
+ rule=args.get("rule", "notify"), **timing)
106
  result = _item(scheduler.get(session.runtime, schedule_id))
107
 
108
  def save_preview(doc):
 
174
  "phrase or five-field cron, once_at for an ISO date and time, or trigger='sync'. "
175
  "A one-off note uses text and once_at. Optional timezone defaults to your workspace. "
176
  "Queries repeat at most once an hour. Query scope comes from your current connection. "
177
+ "Optional rule is notify, draft, ask or act and defaults to notify. "
178
+ "Draft, ask and act need change with record_id and one field in values. "
179
  "Create, pause, resume and delete need confirm_change. Delete needs the exact phrase shown. "
180
  "List and inbox return only your schedules and unread result envelopes. "
181
  "Inbox marks a result read only when you explicitly name its id in shown. "
 
184
  "actions": {
185
  "create": _action(create, {"database": {"type": "string", "minLength": 1}, "payload": _QUERY,
186
  "words": _TEXT, "text": _TEXT, "label": _TEXT, "when": _TEXT,
187
+ "once_at": _TEXT, "trigger": {"enum": ["sync"]}, "timezone": _TEXT,
188
+ "rule": {"enum": ["notify", "draft", "ask", "act"]},
189
+ "change": {"type": "object", "properties": {
190
+ "record_id": {"type": "string", "minLength": 1}, "values": {"type": "object"}},
191
+ "required": ["record_id", "values"], "additionalProperties": False}}, read=False),
192
  "list": _action(list_schedules),
193
  "pause": _action(pause, _ID, ("id",), read=False),
194
  "resume": _action(resume, _ID, ("id",), read=False),
web/public/AIOS_DEPLOY_RECEIPT CHANGED
@@ -1 +1 @@
1
- 415d84b20263bd442fbd47c9be59ef478c711bb03c696b2c31484bf8ecc5f230
 
1
+ 31dbcc6a7ce5c003402b1bc58feb839c5616d108e0b8569d392eeaf04b064cbb