Skip to content

About

A human-in-the-loop agent for conflict-aware, verified schedule changes.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

26 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Schedule Guardian

一个面向日程冲突的 Human-in-the-loop Agent:理解自然语言改期请求,检测冲突,提出最多三个可行方案,在用户明确批准后执行修改,并通过 reread 验证结果。

Built for GOSIM Agentic App Hackathon 2026 by 事了拂衣去.

Current boundary: the application runs in the real OctoSense Desktop Shell and uses real MiniMax intent extraction through host.request("model.complete"). Calendar state is a Local/Demo Calendar, not the official OctoSense Calendar.

Problem

日历可以记录事件,但无法保护事件背后的目标。一次会议改期可能与已有安排重叠;用户仍需要自己发现冲突、寻找空闲时间、执行修改并确认结果。

Schedule Guardian 把这段流程变成可验证的 Agent 任务,同时把最终控制权留给用户。

What Schedule Guardian Does

  • 理解自然语言改期请求;
  • 将模型输出验证为结构化 calendar_change intent;
  • 读取当前 Calendar state;
  • 检测真实时间重叠;
  • 生成 0–3 个可行候选时间;
  • 解释推荐理由并等待人工批准;
  • 只执行用户批准的具体 plan_id + version;
  • 写入后重新读取 Calendar;
  • 输出 VERIFIED、NO_CHANGE 或 NO_FEASIBLE_ALTERNATIVE。

Agentic Workflow

flowchart TD
    A[Natural-language request] --> B[OctoSense host.request model.complete]
    B --> C[Real MiniMax intent extraction]
    C --> D[Validated calendar_change intent]
    D --> E[ScheduleGuardianApplication]
    E --> F[Agent Core]
    F --> G[CalendarProvider]
    G --> H[Conflict detection]
    H --> I[0–3 feasible alternatives]
    I --> J[Human approval]
    J -->|Approve: plan_id + version| K[Execute]
    J -->|Reject| L[No write]
    K --> M[Reread Calendar]
    L --> M
    M --> N[VERIFIED / NO_CHANGE / NO_FEASIBLE_ALTERNATIVE]
Loading

真实 Shell 已验证:

Schedule Guardian
→ host.request("model.complete")
→ OctoSense Model Service
→ MiniMax
→ callback / real response
→ validated calendar_change intent
→ Agent Core

MiniMax 只负责结构化 intent。冲突判断、候选时间、审批绑定、写入与验证均由可测试的 Agent Core 完成。

Architecture

OctoSense Desktop Shell
        │
        ├── OctoScript Calendar + Agent UI
        ├── model.complete → MiniMax
        │
        └── app-data state/action boundary
                       │
             Python development companion
                       │
          ScheduleGuardianApplication
                       │
                  Agent Core
                       │
               CalendarProvider
                       │
          LocalCalendarProvider
          events.json + backup

关键边界:

  • octosense_app/bundle/:官方 OctoScript App bundle;
  • octosense_adapter/:输入、ApplicationState、presentation 与 action routing;
  • src/engine.py:唯一冲突检测、规划、审批、执行和验证核心;
  • src/calendar_provider.py:CalendarProvider contract;
  • adapters/local_calendar.py:当前 Local/Demo Calendar 持久化实现。

详细说明见 Architecture 与 OctoScript bridge。

Demo

Golden scenario

Project Sync 请求改为 14:30–15:30
Design Review 已存在于 15:00–16:00
冲突区间:15:00–15:30

Agent 展示最多三个真实可行时间。用户可以选择:

  • 调整日程:写入 Local/Demo Calendar,reread 后验证;
  • 保持原计划:不写 Calendar,reread 后确认 NO_CHANGE;
  • 返回修改需求:只返回输入状态,不产生写入。

无可行时段时,Agent 显示 NO_FEASIBLE_ALTERNATIVE,不会编造方案,也不会修改 Calendar。

最终真实 Shell 截图将保存在 docs/screenshots/;2–3 分钟演示脚本见 DEMO_SCRIPT.md,最终视频文件为:

docs/demo/schedule-guardian-demo.mp4

Human Control

  • 任何 Calendar mutation 前必须得到明确批准;
  • Approve 与具体 plan_id、Calendar version 绑定;
  • 过期/stale action 会被拒绝;
  • Reject 不调用写入层;
  • 用户可以选择候选方案、返回修改需求或保持原计划;
  • UI 明确提示“仅在你确认后修改日程”;
  • 执行完成后展示修改前后时间与 read-back 结果。

Reliability

当前自动化覆盖:

  • conflict / no conflict;
  • Approve / Reject;
  • no feasible alternative;
  • malformed model response;
  • model unavailable;
  • stale state/version;
  • provider/write failure;
  • reread/verify failure;
  • persistent-state backup/recovery;
  • ambiguity/clarification 与 fail-closed 行为。

模型服务成功返回但 response 非法或缺少 intent 时,应用 fail closed,不会把 deterministic fallback 冒充为真实 AI 成功。只有模型服务确实不可用或超时时,才允许用户使用手动确定性输入。

How to Run

One-command card-host demonstration

在仓库根目录运行:

powershell -ExecutionPolicy Bypass -File tools/demo.ps1

该命令启动 Python companion 和官方 Windows card-host。它使用 Local/Demo Calendar,不访问系统或云端 Calendar。

Manual development run

Terminal 1:

python -m octosense_adapter.card_host_bridge `
  --fixture project `
  --app-data octosense_app/.local-state

Terminal 2:

python D:\GOSIM-AgenticApp\official\OctoScript-App-Design-Flow\tools\octo run `
  octosense_app/bundle `
  --app-data octosense_app/.local-state `
  --port 8142

真实 Desktop Shell 验证需要使用官方 local-catalog 流程安装 bundle,并让 companion 的 --app-data 指向同一 Schedule Guardian app-data jail。安装 bundle 本身不会启动 Python companion。

Tests

最终收口基线:

python -m pytest -q
# 121 passed

python D:\GOSIM-AgenticApp\official\OctoScript-App-Design-Flow\tools\octo check `
  octosense_app/bundle

hub check octosense_app/bundle --allow-unsigned
git diff --check

octo check 与 hub check --allow-unsigned 已通过。Unsigned local check 是开发验收,不代表正式 App Hub 发布批准。

Current Platform Boundary

Implemented and verified

  • 官方 OctoScript bundle;
  • 真实 OctoSense Desktop Shell 安装与启动;
  • Real MiniMax intent extraction via OctoSense model.complete;
  • deterministic Agent Core;
  • 0–3 feasible alternatives;
  • approval/version gate;
  • Local/Demo Calendar persistence;
  • write → reread → verify;
  • Reject/no-write 与 no-slots/fail-closed。

Local/Demo Calendar

当前 Calendar 是 LocalCalendarProvider,数据保存在 Schedule Guardian 自己的 app-data jail。它不是 Google Calendar、Outlook Calendar 或官方 OctoSense Calendar。

最新版官方 OctoSense Calendar host service 仅允许 os.calendar 自身访问;App Hub 也没有向第三方 Splash App 暴露完整 Calendar update/reschedule capability。因此:

Local/Demo Calendar — official third-party Calendar access is not currently exposed by OctoSense.

项目不会通过私有 events.json、跨 App sandbox 或虚构的 host.request("calendar.*") 绕过平台限制。

Not claimed

  • 官方/system Calendar integration;
  • Google/Outlook Calendar;
  • native Shell-to-Python host service;
  • 正式 App Hub publication;
  • 天气、交通、邮件、多 Agent 或长期 Memory。

Team

Repository Map

  • octosense_app/ — official OctoScript bundle and local validation assets
  • octosense_adapter/ — OctoSense input/presentation/action boundary
  • src/ — Agent Core and CalendarProvider contract
  • adapters/ — Local/Demo Calendar implementation
  • tests/ and root test_*.py — regression and contract tests
  • docs/ — architecture, platform status, screenshots and demo materials
  • demo/, ui/ — reference/development demos, not the final OctoSense UI

The repository preserves historical provenance and attribution in MVP_PROVENANCE.md and PR3_MIGRATION.md.

About

A human-in-the-loop agent for conflict-aware, verified schedule changes.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages