Files
multi-agent-bidding/app/__pycache__/models.cpython-310.pyc
T

73 lines
9.4 KiB
Plaintext
Raw Normal View History

2026-04-12 01:55:34 +08:00
o
ÙˆÚi‚%ã@dZddlmZmZddlmZmZmZmZddl m
Z
ddl Z ddl Z Gddde
ƒZ
Gdd „d e
ƒZeGd
d d ƒƒZeGd d
d
ƒƒZeGdddƒƒZeGdddƒƒZeGdddƒƒZeGdddƒƒZeGdddƒƒZeGdddƒƒZdS)u5
多智能体竞标调度架构 - æ ¸å¿ƒæ•°æ®æ¨¡åž‹
é)Ú dataclassÚfield)ÚListÚDictÚOptionalÚAny)ÚEnumNc@s8eZdZdZdZdZdZdZdZdZ dZ
d Z d
Z d Z
d S)
Ú
TaskStatusu 任务状æ€ÚpendingÚ publishedÚbiddingÚassignedÚ executingÚ
validatingÚretryÚ completedÚfailedÚ
terminatedN)Ú__name__Ú
__module__Ú __qualname__Ú__doc__ÚPENDINGÚ PUBLISHEDÚBIDDINGÚASSIGNEDÚ EXECUTINGÚ
VALIDATINGÚRETRYÚ COMPLETEDÚFAILEDÚ
TERMINATED©r"r"úL/home/xian/.openclaw/workspace-coder/works/multi-agent-bidding/app/models.pyr sr c@seZdZdZdZdZdZdS)ÚTaskTypeu 任务类型ÚserialÚparallelÚ independentN)rrrrÚSERIALÚPARALLELÚ INDEPENDENTr"r"r"r#r$s
r$c@eZdZUdZedddZeed<ej Z
eed<dZ eed<ee dZ
eed <ee dZeed
<ee dZeed <d Zeed
<dZeed<eedZeeed<ejZeed<eejdZeed<dZeeed<defddZdS)ÚTasku 任务定义cCótt ¡ƒddS©©ÚstrÚuuidÚuuid4r"r"r"r#Ú<lambda>$óz
Task.<lambda>©Údefault_factoryÚidÚtypeÚÚ descriptionÚ
input_dataÚ
output_schemaÚvalidation_criteriai,ÚtimeoutrÚpriorityÚ dependenciesÚstatusÚ
created_atNÚparent_request_idÚreturnc
Cs:|j|jj|j|j|j|j|j|j|j |j
j|j |j dœ S)N) r7r8r:r;r<r=r>r?r@rArBrC)
r7r8Úvaluer:r;r<r=r>r?r@rArBrC©Úselfr"r"r#Úto_dict1sôz Task.to_dict) rrrrrr7r0Ú__annotations__r$r*r8r:Údictr;rr<r=r>Úintr?Úlistr@rr rrAÚtimerBÚfloatrCrrHr"r"r"r#r+!s
   r+c@eZdZUdZedddZeed<dZeed<dZ eed<d Z
e ed
<d Z e
ed <d Ze ed
<dZeed<eedZeeed<eedZeeed<eejdZe ed<defddZdS)ÚBidu 竞标书cCr,r-r/r"r"r"r#r3Er4z Bid.<lambda>r5r7r9Útask_idÚagent_idgà?Úcapability_matché<Úestimated_timeÚ
confidenceÚapproachÚ
prerequisitesÚalternative_approachesrBrDc Có.|j|j|j|j|j|j|j|j|j|j dœ
S)
r7rPrQrRrTrUrVrWrXrBrZrFr"r"r#rHPóöz Bid.to_dictN)rrrrrr7r0rIrPrQrRrNrTrKrUrVrLrWrrXrMrBrrHr"r"r"r#rOBs
      rOc@eZdZUdZedddZeed<dZeed<dZ eed<dZ
eed <d
Z eed <ee j dZ
eed <d
Zeeed<d
Zeeed<d
Zeeed<dZeed<defddZd
S)Ú Executionu 执行记录cCr,r-r/r"r"r"r#r3br4zExecution.<lambda>r5r7r9rPrQÚbid_idÚrunningrAÚ
start_timeNÚend_timeÚresultÚerrorrÚ retry_countrDc CrY)
r7rPrQr]rAr_r`rarbrcrdrFr"r"r#rHmr[zExecution.to_dict)rrrrrr7r0rIrPrQr]rArMr_rNr`rrarrbrcrKrrHr"r"r"r#r\_s
     r\c@sdeZdZUdZdZeed<eedZ e
e ed<eedZ e
e
ed<dZeed<d e fd
d Zd S)
ÚValidationResultu 验è¯ç»“æžœFÚpassedr5ÚchecksÚissuesçÚscorerDcCs|j|j|j|jdœS)rfrgrhrjrkrFr"r"r#rHs
üzValidationResult.to_dictN)rrrrrfÚboolrIrrLrgrrrhr0rjrNrHr"r"r"r#re|s
  rec@eZdZUdZedddZeed<dZeed<dZ eed<d Z
e e ed
<d Z
e eed <d Zeed
<d Ze eed<dZeed<d Ze eed<defddZd S)ÚAttemptu一次完整的å°è¯•记录cCr,r-r/r"r"r"r#r3r4zAttempt.<lambda>r5r7r9rPrQNÚ executionÚ
validationFÚsuccessÚ failure_typeriÚdurationÚfeedbackrDc
CsF|j|j|j|jr|j ¡nd|jr|j ¡nd|j|j|j|j dœ S)N) r7rPrQrnrorprqrrrs)
r7rPrQrnrHrorprqrrrsrFr"r"r#rHšs÷zAttempt.to_dict)rrrrrr7r0rIrPrQrnrr\rorerprlrqrrrNrsrrHr"r"r"r#rms
    rmc@eZdZUdZdZeed<dZeed<dZeed<e e
dZ e eed<dZ
eed <e e
dZe eed
<d Zeed <d Zeed