Skip to content

Add the Parsar Agent workspace with Web and Feishu on the public Agents API - #700

Merged
SaladDay merged 40 commits into
mainfrom
feat/parsar-collaborative-workspace
Oct 25, 2026
Merged

SaladDay merged 40 commits into
mainfrom
feat/parsar-collaborative-workspace

Conversation

@SaladDay

@SaladDay SaladDay commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Parsar is an optional example product, started independently of Core, that reaches Core only through the public /v1 Agents API and a dedicated Project key. It turns reusable resources into conversational Agents available on the Web and in Feishu.

  • Agents and resources: an Agent carries its Harness, model and execution options (validated against one shared Harness declaration), instructions, Skills, MCP, Plugins, knowledge, instruction fragments and a required environment template. Copying an Agent creates an independent one. Resource counts follow Core's Environment limits.
  • Environment templates: npm/Python packages, setup script, write-only variables and initial files, sent inline in each Session request. Optional prepared Sessions hide cold starts. Setup keeps persistent state under /workspace, as Core's preparation reuse requires.
  • Conversations: one Web conversation is one Session, frozen at creation. Feishu private chat keeps one Session per sender until /new; each group topic is one shared Session. Topic replies addressed only to other people, @all and external tenants are ignored. Feishu runs with the bot's application identity.
  • Reliability: a Turn ledger records every Web and Feishu input. A monitor replaces a failed or never-started Environment once with the frozen request, cancels and resends a Turn silent for 45 s once, resends a Turn that failed before output once, and settles input Core never admitted. Failures are explained in plain language with a retry.
  • Visibility: 运行 (directly under 新对话, with a live count) lists running Turns with their stage, waiting time and usual first-reply time, and recently finished ones; Agents show seven-day health; models have a one-shot test and environment templates a real trial run; 产物 lists conversation outputs; thinking streams live in Web conversations; chats preview images and offer file downloads.
  • Feishu: QR or existing-app onboarding, progress and result cards edited in place, compact replies with collapsible details, image/file delivery, durable ordered delivery and recovery.
  • Management: cli.mjs is a dependency-free JSON client of the same /app and /v1 routes the UI uses; the manager example assembles an ordinary Agent with it, optionally behind an authenticated HTTPS gateway (Caddy example).
  • Client package: @oac/agents-client projects reasoning summary stream events instead of passing them through as unknown events.

Core is unchanged: no privileged endpoint, no shared tables, no Core key in the product.

Test plan

  • make check-example: typecheck, 83 server tests, build, 25 browser tests
  • make check-web-unit: @oac/agents-client 742 tests, console 344 tests, console build
  • make check-docs check-ci
  • Deployed to a lab OAC (mx): Web and Feishu conversations, bot identity, cache-hit Sessions with lark-cli, model test, trial run, prepared-Session recovery
  • CI on this PR

Generated with Devin

@SaladDay SaladDay changed the title Build Parsar collaborative workspace Build Parsar workspace with Feishu on public Agents API Oct 14, 2026
@blacksmith-sh

This comment has been minimized.

SaladDay and others added 19 commits October 15, 2026 06:10
P0 keeps two entry points: the Web chat and Feishu bots. Agents are the
reusable thing people talk to, and each conversation is one public Session.

- Remove tasks, projects, schedules, the external MCP endpoint, frontend
  extensions and personal OAuth connections.
- Agents require an environment template; Duplicate replaces templates.
- A Feishu bot binds one Agent and is its identity. Environment templates
  map bot fields to variables, and the Feishu case configures lark-cli with
  them so the CLI mints and refreshes tenant tokens itself.
- Feishu creates Sessions directly: one per private sender until /new, one
  shared conversation per group topic. Group chat is a switch; joining a
  group is enough. Earlier group messages are never read.
- Feishu progress cards show the current step and keep thinking and the
  step record in collapsed panels with success and failure colors.
- Redesign the Web UI as a chat product with readable type and spacing.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
- MiniMax Code now uses the selected Provider and supports HTTP MCP and
  functions, so Parsar drops its MiniMax-only restrictions.
- Use randomUuid from @oac/agents-client everywhere so IDs work without a
  secure context.
- Keep main's docs layout and describe the Web chat and Feishu product.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Core now passes official execution options through to each Harness, so
Agents can turn on live web search (Codex and Claude Code) and choose a
reasoning effort. Searches show as readable steps on the Web and in
Feishu records.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
- Save on the Agent page points to the missing required field instead of
  staying silently disabled; required model and environment come first.
- Unsaved Agent edits are restored after navigating away in the same tab.
- People can keep typing while the Agent works; the message reaches the
  running task.
- Hide the turn rail in short conversations, use one disclosure style for
  step groups, mark the selected Agent on the home page and make template
  placeholders read as examples.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
An execution profile is the cloud counterpart of a local Codex profile:
Harness, model, reasoning effort and summary, web search, verbosity and
service tier. Agents reference one profile and one environment template;
conversations never override either.

- One shared declaration lists the values each Harness admits; the server
  validates against it and the editor offers only those values, resetting
  any the newly selected Harness does not accept.
- The resource library groups building blocks by what uses them, and
  removal is disabled while something still references an item.
- Feishu's case adds profile.json, and configure.mjs creates the profile.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Measured on a hosted Core, a new Feishu workspace conversation waited about
25 seconds for setup before its first reply; a Session created without input
is prepared by Core immediately. With the template switch on, Parsar keeps
one such Session per Agent and hands it to the next Web or Feishu
conversation with its first message.

- The match is a hash of the frozen request without input and metadata, so
  any change to the Agent, profile, template, bot or provider replaces it.
- Taking a prepared Session refills it; uncertain first-input delivery keeps
  the conversation's key and retries the same input.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
OAC_EXAMPLE_HOST selects one IPv4 address of the machine. It is both the
listen address and the only accepted Host, so DNS-rebinding protection
stays exact; loopback remains the default. Parsar has no sign-in, which
the README states next to the setting.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Inside a topic the bot takes part in, replies without a mention continue
the conversation. A reply that mentions only other people is meant for
them, so the bot no longer answers it; mentioning the bot as well still
reaches it.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Agents allowed at most eight Skills, eight MCP servers and eight
instruction fragments, Plugins and knowledge items combined. None of this
came from Core, which admits 50 Skills, 50 Plugins and 50 initial files per
Environment. Parsar now applies exactly those limits from one shared
definition, counts knowledge with the template's own files, and leaves
instruction fragments and MCP servers uncounted.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Execution profiles added a template entity that Agents only referenced:
three Agents shared two profiles, conversations cannot override them, and
reading an Agent's model took an extra hop. Copying an Agent already covers
reuse, as for every other Agent setting. The Harness, model and options
return to the Agent, keeping the same Harness-declared option set, the
reset notice on engine changes and the 执行与环境 section.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
On mx, three of seven Feishu workspace conversations failed while
initializing and two turns waited about 180 s for a first output. Parsar
now keeps a ledger of every Web and Feishu turn and a monitor that only
acts while nothing has run: a failed Environment is replaced once with the
identical frozen request, a turn silent for 45 s is cancelled and resent
once, and a turn failing before output is resent once. Replaced turns stay
hidden in Web and unreported in Feishu.

- The Web composer sends through Parsar so its turns are watched too.
- Users see the stage, waiting time and usual first-reply time, and final
  failures in plain language with a retry.
- Models get a one-shot test, environment templates a real trial run,
  Agents seven-day health, and a page lists all conversation outputs.
- The Feishu bot ignores messages from external tenants.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Core now reuses an identical earlier preparation for up to 24 hours and
keeps only /environment. The Feishu workspace's setup wrote lark-cli's
configuration to HOME and its encrypted credentials to ~/.local/share, so
every reused preparation started with an unconfigured lark-cli; the same
happened after a conversation moved to a new sandbox. The preset and the
Feishu example now point LARKSUITE_CLI_CONFIG_DIR and LARKSUITE_CLI_DATA_DIR
at /workspace/.lark-cli, and the README states that setup must keep what it
needs under /workspace.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
- The Feishu workspace preset is the shipped example: the editor imports
  examples/feishu/environment.json and setup.sh instead of a second copy.
- Web and Feishu cards read the waiting copy from shared/turn-status.mjs.
- Every follow-up, from Web, Feishu or a manual retry, is recorded and sent
  through one ledger path that keeps its baseline across send retries, and
  an input Core never admitted settles instead of staying "running".
- Environment trial runs move out of Session creation into trials.mjs.
- Resource actions are one route table; the frozen request is hidden only at
  the response boundary; one helper downloads Artifacts.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
The first input of a claimed prepared Session was sent before Parsar
recorded it, so while it waited for a free sandbox slot neither Web nor
Feishu showed a stage and the monitor could not see it. It now takes the
same record-then-send path as every follow-up, and any input that Core
never admits settles once Core's five-minute reservation has expired.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
SaladDay and others added 8 commits October 22, 2026 17:44
The monitor took the newest Core Turn after an entry's baseline. When a
follow-up arrived before the first input was settled, both entries
followed the follow-up's Turn and the first one was settled with its
outcome. An input's Turn is the oldest one after its baseline, because
later inputs only start later Turns.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Core answers input to an idle Session only once its Turn starts. Claiming
a prepared Session awaited that answer, so a prepared Session that never
started (one stayed "transitioning" on mx for 26 minutes) kept the new
conversation spinning for five minutes and then left it without a reply.
Claiming now records the Turn and sends the input in the background, and
keeps the frozen request; when the input cannot be sent or the Turn has
not started within 45 seconds, the monitor creates the Session normally
through the same path that replaces a failed Environment.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
SaladDay and others added 4 commits October 24, 2026 03:05
Finding a stuck or slow turn meant opening conversations one by one or
reading Core logs. The 运行 view now reads the Turn ledger: running turns
from Web and Feishu with their stage, waiting time and the Agent's usual
first-reply time, recently finished turns with duration, automatic
recoveries and failure, and counts of running, waiting-for-you and recent
failures with a five-minute concurrency line. Running turns can be stopped
and a conversation's latest failed turn retried from there.

It replaces the per-conversation run list that polled Core for every
Session's Turns.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
The 运行 view was reachable only through 全部对话. It now has its own entry
below 新对话 that shows how many conversations are running, read from the
same Turn overview query as the page.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@SaladDay SaladDay changed the title Build Parsar workspace with Feishu on public Agents API Add the Parsar Agent workspace with Web and Feishu on the public Agents API Oct 25, 2026
@SaladDay
SaladDay marked this pull request as ready for review October 25, 2026 13:24
@SaladDay
SaladDay merged commit 22d026e into main Oct 25, 2026
25 checks passed
@SaladDay
SaladDay deleted the feat/parsar-collaborative-workspace branch October 25, 2026 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant