Commit Graph
3742 Commits
Author SHA1 Message Date
Charles YaoandClaude Opus 4.8 606cff1964 copilot: Edit test_affected_paths + review + reverted handlers
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-23 02:17:26 -07:00
Charles YaoandClaude Opus 4.8 5287d579d9 copilot: Edit plan_approval (the edit) + apply_changes handlers
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-23 02:07:26 -07:00
Charles YaoandClaude Opus 4.8 17dd777a29 copilot: Edit capability_check + impact_analysis handlers
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-23 01:53:47 -07:00
Charles YaoandClaude Opus 4.8 dddf6b16fd copilot: canned Edit cognition on PlaceholderAgent + CopilotAgent Edit methods
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-23 01:37:06 -07:00
Charles YaoandClaude Opus 4.8 f668959ece copilot: CopilotContext Edit fields + serde defaults
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-23 01:29:17 -07:00
Charles YaoandClaude Opus 4.8 8f39028fda copilot: make handle_plan_approval idempotent on loop-back rebuilds
continue_adjusting/revert/retry_after_revert all return to
build.initial_plan without resetting the already-built graph. Re-walking
find_resources -> confirm_resources -> approve_plan then re-emits the same
fixed create_node/connect intents, and the second apply_repair raised
ValueError on the colliding node id, dead-ending the session at
build.plan_approval.

Fix: before applying, read the current draft graph and drop any
create_node whose node_id already exists or connect whose (from, to) edge
already exists, so a re-approve after a loop-back is a no-op apply_repair
rather than a crash. built_node_ids is still set from the full 4-node set
regardless of what was actually applied this pass.

Adds an end-to-end loop test via the real Runner covering both the
continue_adjusting and retry_after_revert paths, asserting the session
reaches build.execution with the graph still at 4 nodes / 3 edges.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-22 23:45:45 -07:00
Charles YaoandClaude Opus 4.8 747441ee55 copilot: Build publish + governance_feedback + reverted handlers
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-22 22:45:07 -07:00
Charles YaoandClaude Opus 4.8 b6e857b931 copilot: Build test_and_repair (canned) + review handlers
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-22 22:34:52 -07:00
Charles YaoandClaude Opus 4.8 ed4db951e6 copilot: Build resource_recommendation + plan_approval (the build) + execution
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-22 22:17:56 -07:00
Charles YaoandClaude Opus 4.8 3204c31b06 copilot: Build goal_analysis + initial_plan handlers
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-22 22:00:12 -07:00
Charles YaoandClaude Opus 4.8 25b897353d copilot: Build session bootstrap + capability_check handler + merged registry
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-22 21:49:48 -07:00
Charles YaoandClaude Opus 4.8 d0f6b09319 copilot: canned Build cognition on PlaceholderAgent + CopilotAgent Build methods
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-22 21:35:59 -07:00
Charles YaoandClaude Opus 4.8 4be0e77ade copilot: rename FixContext -> CopilotContext + additive Build fields
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-22 21:24:48 -07:00
Charles Yao b3b4776e95 feat(workflow-copilot): opt-in per-intent canvas-event emission through apply_repair 2026-08-22 10:57:37 -07:00
Charles YaoandClaude Opus 4.8 c8c1a7052d feat(workflow-copilot): apply_repair dispatches all 5 verbs + real graph diff feeds change_set
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-22 10:46:12 -07:00
Charles YaoandClaude Opus 4.8 1e3578d341 feat(workflow-copilot): document + enforce MutationIntent's per-op arg contract
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-22 09:48:05 -07:00
Charles Yao f9b38f9be0 fix(workflow-copilot): reachable reject at approval gate, client-only-action guard, contract doc fixes 2026-08-22 01:55:17 -07:00
Charles YaoandClaude Opus 4.8 7b2e975c5f feat(workflow-copilot): typed contract schemas (TS + JSON) with lockstep check
Add contract_gen.py: a pure, deterministic generator that discovers every
StrEnum/dataclass/card defined in contract.py (plus EntryMode,
ConversationItem, and SessionView) via introspection and emits the checked-in
contract_schema.json (JSON Schema draft 2020-12) and
web/.../contract/types.ts. The discriminated ConversationItem union is built
from _Card.__subclasses__(), one oneOf/union branch per card kind.

test_contract.py gains a lockstep test that byte-compares a fresh
generate() call against the checked-in files (guards drift/hand-edits) and a
jsonschema.validate test that proves the generated schema is itself valid
and accepts a real SessionView instance.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-22 01:10:47 -07:00
Charles Yao d089a84da7 refactor(workflow-copilot): re-express Fix conversation items onto the card vocabulary 2026-08-22 00:48:03 -07:00
Charles Yao 55752cd435 feat(workflow-copilot): 17-kind card vocabulary + submit payload types 2026-08-22 00:00:46 -07:00
Charles Yao eb1ee3981a feat(workflow-copilot): Action/CheckpointRef + SessionView entry_mode/phase/actions/checkpoint 2026-08-21 23:36:53 -07:00
Charles Yao 6bceb1be62 feat(workflow-copilot): contract enums + Build/Edit PcState sets 2026-08-21 23:24:13 -07:00
Charles Yao 6d4e9dd59b feat(copilot): port canned placeholder agent 2026-08-18 21:45:05 -07:00
Charles YaoandClaude Opus 4.8 0bd9b1f94a feat(copilot): port checklist handlers + merged fix registry
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-18 21:45:05 -07:00
Charles Yao b0177e9044 docs(copilot): document save_run id-preservation contract (T6 review) 2026-08-18 21:45:05 -07:00
Charles YaoandClaude Opus 4.8 37008011e2 feat(copilot): port run-fix handlers
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-18 21:45:04 -07:00
Charles YaoandClaude Opus 4.8 04f350d2e5 feat(copilot): port runner with version-CAS advance
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-18 21:45:04 -07:00
Charles YaoandClaude Opus 4.8 95f2a11023 feat(copilot): port ports, value types, errors
Port dify-enterprise/server/pkg/enterprise/biz/copilot/{ports,errors}.go to
api/core/workflow_copilot as pure Python.

- errors.py: ConflictError, NotFoundError, BusyError (Exception subclasses,
  replacing Go's sentinel error values).
- models.py: add Diagnosis, Risk, MutationIntent, ChangeSet, NodeEvent,
  ApplyResult value dataclasses (Go: ports.go); tighten FixContext.diagnosis/
  staged_repair/risk/change_set from Any to these real types now that they
  live in the same module (avoids a models<->ports import cycle).
- ports.py: CopilotAgent / DifyPort / Repository as @runtime_checkable
  Protocols, snake_case methods per the port plan; DifyPort methods take
  actor: Actor instead of Go's ForwardAuth.
- test_ports.py: constructs each value type, asserts trivial stubs satisfy
  each Protocol via isinstance, and checks the error types.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-18 21:45:04 -07:00
Charles Yao 1b98b0fb29 feat(copilot): port domain models 2026-08-18 21:45:04 -07:00
Charles Yao d779b1629a feat(copilot): port PcState machine to api/core/workflow_copilot 2026-08-18 21:45:04 -07:00
zyssyz123 c38fb16efa fix(agent): retain usage for incomplete runs (#40937) 2026-08-18 13:11:22 +00:00
zyssyz123 5a0a12cb44 fix: preserve Agent tool-generated file outputs (#40917) 2026-08-18 05:59:43 +00:00
蓝破碎半圆/破碎蓝调 ba5e7d76fd fix: accept legacy plugin daemon list responses (#38265) 2026-08-18 04:11:49 +00:00
Harsh KashyapandHarsh Kashyap ca32e87683 fix(api): bound connect phase to 5.0s in two api/core/ outbound timeouts (#40807)
Co-authored-by: Harsh Kashyap <Harsh23Kashyap@users.noreply.github.com>
2026-08-18 03:38:59 +00:00
mesrop2008 50d6c19ef4 fix(api): clear stale cancellation signals when resuming a paused workflow (#40905) 2026-08-18 02:27:43 +00:00
Asuka Minato ce1aed8df5 test: migrate RAG pipeline sessions and ORM models to SQLite (#40511) 2026-08-17 12:12:46 +00:00
盐粒 Yanli 2aaac4dadb feat(dify-agent): enforce signed upload size limits (#40883) 2026-08-17 11:59:42 +00:00
盐粒 Yanli a679ee5644 fix(dify-agent): preserve snapshots for failed and cancelled runs (#40876) 2026-08-17 10:11:22 +00:00
盐粒 Yanli 96809473fc feat(dify-agent): add context-aware history compaction (#40872) 2026-08-17 09:36:21 +00:00
zyssyz123 64587eae43 fix(workflow): preserve historical Agent node compatibility (#40859) 2026-08-17 07:31:38 +00:00
mesrop2008 c2e68335d4 docs: fix pipeline_generator docstrings to reference pipeline instead of app_model (#40813) 2026-08-15 12:09:16 +00:00
Harsh KashyapandHarsh Kashyap d43685bc79 fix(extension): chain original exception in APIBasedExtensionRequestor per PEP 3134 (#40810)
Co-authored-by: Harsh Kashyap <Harsh23Kashyap@users.noreply.github.com>
2026-08-15 08:48:28 +00:00
Dream 8031ea6d73 fix: replace bare except with except Exception in core agent, storage and vector backends (#40801) 2026-08-15 00:56:09 +00:00
chelsealong b537fed907 fix(api): point SSRF-blocked error message at the correct dify issue (#40605) 2026-08-14 11:46:50 +00:00
盐粒 Yanli 3acc9470d4 feat(dify-agent): expand and enforce agent run limits (#40641) 2026-08-14 08:27:19 +00:00
林玮 (Jade Lin) 4e44ade07f fix: handle long text URLs in webscraper (#40757) 2026-08-14 07:34:53 +00:00
Crazywoola 58653f2cdb feat(workflow-generator): prefer installed tools (#40611) 2026-08-14 05:38:37 +00:00
林玮 (Jade Lin) 755c154b1f refactor: resolve completion model via manager (#40756) 2026-08-14 02:52:42 +00:00
Harsh KashyapandHarsh Kashyap 8238684334 fix(api): chain original exception in 13 except blocks per PEP 3134 (#40738)
Co-authored-by: Harsh Kashyap <Harsh23Kashyap@users.noreply.github.com>
2026-08-13 17:50:05 +00:00
zyssyz123andyyh c9c7fb9962 fix(agent): meter internal LLM calls through API (#40613)
Co-authored-by: yyh <92089059+lyzno1@users.noreply.github.com>
2026-08-13 12:15:44 +00:00