tactus 0.30.0__py3-none-any.whl → 0.31.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- tactus/__init__.py +1 -1
- tactus/adapters/lua_tools.py +23 -1
- tactus/adapters/mcp_manager.py +62 -35
- tactus/broker/server.py +314 -0
- tactus/cli/app.py +11 -1
- tactus/core/dsl_stubs.py +138 -41
- tactus/core/output_validator.py +69 -15
- tactus/core/registry.py +13 -25
- tactus/core/runtime.py +208 -69
- tactus/dspy/agent.py +87 -30
- tactus/ide/server.py +0 -10
- tactus/primitives/__init__.py +0 -2
- tactus/primitives/handles.py +8 -3
- tactus/primitives/procedure_callable.py +36 -0
- tactus/protocols/config.py +0 -5
- tactus/protocols/result.py +3 -3
- tactus/stdlib/tac/tactus/tools/done.tac +1 -1
- tactus/stdlib/tac/tactus/tools/log.tac +1 -1
- tactus/testing/README.md +1 -12
- tactus/testing/behave_integration.py +12 -2
- tactus/testing/context.py +156 -46
- tactus/testing/mock_agent.py +43 -8
- tactus/testing/steps/builtin.py +264 -54
- tactus/testing/test_runner.py +6 -0
- tactus/validation/semantic_visitor.py +19 -11
- {tactus-0.30.0.dist-info → tactus-0.31.1.dist-info}/METADATA +9 -11
- {tactus-0.30.0.dist-info → tactus-0.31.1.dist-info}/RECORD +30 -31
- tactus/primitives/stage.py +0 -202
- {tactus-0.30.0.dist-info → tactus-0.31.1.dist-info}/WHEEL +0 -0
- {tactus-0.30.0.dist-info → tactus-0.31.1.dist-info}/entry_points.txt +0 -0
- {tactus-0.30.0.dist-info → tactus-0.31.1.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
tactus/__init__.py,sha256=
|
|
1
|
+
tactus/__init__.py,sha256=BJ9CdK9Kx8CsGYAjjINCza1im3hMyVnvuSS05wTE1O0,1245
|
|
2
2
|
tactus/adapters/__init__.py,sha256=lU8uUxuryFRIpVrn_KeVK7aUhsvOT1tYsuE3FOOIFpI,289
|
|
3
3
|
tactus/adapters/broker_log.py,sha256=mIjARt1Q6ouWVbVri6zep1e8tzm9y28l4WOEdqiK39Q,2849
|
|
4
4
|
tactus/adapters/cli_hitl.py,sha256=3dH58du0lN4k-OvQrAHrAqHFqBjolqNKFb94JaNHtn8,6964
|
|
@@ -7,9 +7,9 @@ tactus/adapters/cost_collector_log.py,sha256=Ha3pFMdC0HJ8eBnZpM1VRLm-94RKelu5PEP
|
|
|
7
7
|
tactus/adapters/file_storage.py,sha256=c4prD6-NSEMixrpQsWsdr3xuKzxptoEaLjUkZl9SnKk,12759
|
|
8
8
|
tactus/adapters/http_callback_log.py,sha256=likXNiLGiHXNHAeWGzUPhbd4Di94PJVjXz5ABNRfZig,3687
|
|
9
9
|
tactus/adapters/ide_log.py,sha256=JfJE5rGM_bPfBImod-2_QDhyyk2ObVEmkvhsWSzaBKU,2026
|
|
10
|
-
tactus/adapters/lua_tools.py,sha256
|
|
10
|
+
tactus/adapters/lua_tools.py,sha256=xXWDtcsovGG9yH40pdhRPRbZcql9npw1J9dlwzd8Xb0,13026
|
|
11
11
|
tactus/adapters/mcp.py,sha256=x_K1cIxdhI_yyZB5jt6xh2T4SuZvnE1CEngTcbWvElE,10837
|
|
12
|
-
tactus/adapters/mcp_manager.py,sha256=
|
|
12
|
+
tactus/adapters/mcp_manager.py,sha256=IwyRR6cYtxo6ZX6lBWqCMBE38rnHeMQJ6RdAAfkNq5w,7425
|
|
13
13
|
tactus/adapters/memory.py,sha256=ZUeDyK8dYChJEE5edKOaBsgDivm1Bdn2sKPlqFKM8ps,1970
|
|
14
14
|
tactus/adapters/plugins.py,sha256=HBHoVCk9fYqQxi-6vD_bt5FczMOEAy4v8mKFdOuI_1U,14225
|
|
15
15
|
tactus/backends/http_backend.py,sha256=D2N91I5bnjhHMLG84-U-BRS-mIuwoQq72Feffi7Atxo,1653
|
|
@@ -18,22 +18,22 @@ tactus/backends/pytorch_backend.py,sha256=I7H7UTa_Scx9_FtmPWn-G4noadaNVEQj-9Kjtj
|
|
|
18
18
|
tactus/broker/__init__.py,sha256=UTvqLofrgE3c4m6u2iNOg5R7BrS4dmfzMRO4Oq_0A9U,396
|
|
19
19
|
tactus/broker/client.py,sha256=sDi1Cimuv0zH5S4n597nnUy_qis7pLBZf5IkwF81oDc,8618
|
|
20
20
|
tactus/broker/protocol.py,sha256=fnVgMKU_R7oK2xBATnrYSH_r2R-yOmV2o_pJYw1JvVk,5238
|
|
21
|
-
tactus/broker/server.py,sha256=
|
|
21
|
+
tactus/broker/server.py,sha256=N2o0xFdTSRByjQUHjBSvxn1wA_tpR4FXnb-AAbdCoc8,37566
|
|
22
22
|
tactus/broker/stdio.py,sha256=JXkEz-PCU3IQXNkt16YJtYmwkR43eS6CfjxAHc-YCfQ,439
|
|
23
23
|
tactus/cli/__init__.py,sha256=kVhdCkwWEPdt3vn9si-iKvh6M9817aOH6rLSsNzRuyg,80
|
|
24
|
-
tactus/cli/app.py,sha256=
|
|
24
|
+
tactus/cli/app.py,sha256=2jKrM0GsG8cUL131EMdydnzYMLfhP-Ixvs7rOnI9t24,85556
|
|
25
25
|
tactus/cli/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
26
26
|
tactus/core/__init__.py,sha256=TK5rWr3HmOO_igFa5ESGp6teWwS58vnvQhIWqkcgqwk,880
|
|
27
27
|
tactus/core/config_manager.py,sha256=u90XChTeb2reZ3I6c3o_zI2UlzlFCNtL9-NhE1Vm6L0,31577
|
|
28
|
-
tactus/core/dsl_stubs.py,sha256
|
|
28
|
+
tactus/core/dsl_stubs.py,sha256=Et1VEhrUWaeVYDnqTwJJG7WxfMl18vXOqG8jYRhXvrY,80710
|
|
29
29
|
tactus/core/exceptions.py,sha256=HruvJQ4yIi78hOvvHviNZolcraMwXrlGQzxHqYFQapA,1468
|
|
30
30
|
tactus/core/execution_context.py,sha256=WNd55_JhmkDifA9Td3xIs8to5bwGDlCgPcbvkvLYAv0,16658
|
|
31
31
|
tactus/core/lua_sandbox.py,sha256=WuXRuXSl9ylU0y3ZMvyDWjWiG6GdLVn2csMY-2Zmrbg,18262
|
|
32
32
|
tactus/core/message_history_manager.py,sha256=e3_seV6bWSJVicrZYf2LmaQBvroDXDRc5Tho49fZ_ns,7596
|
|
33
33
|
tactus/core/mocking.py,sha256=1MKtg8FHCYj-Goihi5b8xNNYo-MDuzSpsHEX_e7bnfg,9217
|
|
34
|
-
tactus/core/output_validator.py,sha256=
|
|
35
|
-
tactus/core/registry.py,sha256=
|
|
36
|
-
tactus/core/runtime.py,sha256=
|
|
34
|
+
tactus/core/output_validator.py,sha256=VEJUztQaTH3Zvp2-tkKDAU96Oo2MXVlpI0bceaMBKz8,10152
|
|
35
|
+
tactus/core/registry.py,sha256=2tKIli2z1fwbov7KvvvWFIo_tUdIbeWYo1DuzoNPO_g,19630
|
|
36
|
+
tactus/core/runtime.py,sha256=3dfs_Jzri9_B9PB2VT2KcbQK3gfZbn5dcnw1LRepHlg,129206
|
|
37
37
|
tactus/core/template_resolver.py,sha256=6zRq4zT1lRHdLoa7M-yoLx4hFZ9RcjH9Y0EdaAtW9FU,4033
|
|
38
38
|
tactus/core/yaml_parser.py,sha256=s7VB5Nijy6ReQE7ixlmvZArqupXs_sWP4EY4pCLv25k,13400
|
|
39
39
|
tactus/core/dependencies/__init__.py,sha256=28-TM7_i-JqTD3hvkq1kMzr__A8VjfIKXymdW9mn5NM,362
|
|
@@ -41,7 +41,7 @@ tactus/core/dependencies/registry.py,sha256=bgRdqJJTUrnQlu0wvjv2In1EPq7prZq-b9eB
|
|
|
41
41
|
tactus/docker/Dockerfile,sha256=fnK5kZlgM-L7vboiwfTqcs70OsZsvh1ba4YzRxie138,1887
|
|
42
42
|
tactus/docker/entrypoint.sh,sha256=pL-1MwMdjD1fGgRZYkBeXmJZg57Knmub9ETLYAANvOg,1985
|
|
43
43
|
tactus/dspy/__init__.py,sha256=beUkvMUFdPvZE9-bEOfRo2TH-FoCvPT_L9_dpJPW324,1226
|
|
44
|
-
tactus/dspy/agent.py,sha256
|
|
44
|
+
tactus/dspy/agent.py,sha256=d1Zpg7OUZcRIkHmlbtlgB5N81z0vLhadNloFL73yEpg,45625
|
|
45
45
|
tactus/dspy/broker_lm.py,sha256=EaXlJcUhfM0NV0fD1rASYKSO5gm846KRS5BoT0iO4zs,6239
|
|
46
46
|
tactus/dspy/config.py,sha256=B22ON9Zp-dabI4NYeMbZ5lUL4kqihR7FQ8Z8xKT_eL8,6567
|
|
47
47
|
tactus/dspy/history.py,sha256=0yGi3P5ruRUPoRyaCWsUDeuEYYsfproc_7pMVZuhmUo,5980
|
|
@@ -52,11 +52,11 @@ tactus/formatting/__init__.py,sha256=pkwfAJwMxdRha2oahXoUrVjk6if7QH5d1U5t5dF2fXc
|
|
|
52
52
|
tactus/formatting/formatter.py,sha256=DfHp977t5reMPIWZwRChRE5Yflw7xGgTNUM0AOcS8LQ,14510
|
|
53
53
|
tactus/ide/__init__.py,sha256=1fSC0xWP-Lq5wl4FgDq7SMnkvZ0DxXupreTl3ZRX1zw,143
|
|
54
54
|
tactus/ide/coding_assistant.py,sha256=GgmspWIn9IPgBK0ZYapeISIOrcDfRyK7yyPDPV85r8g,12184
|
|
55
|
-
tactus/ide/server.py,sha256=
|
|
56
|
-
tactus/primitives/__init__.py,sha256=
|
|
55
|
+
tactus/ide/server.py,sha256=4E5Sc3Qf0WYbWjxwNUIK4somjp4a7i_CNpBsj3Bi8GM,94089
|
|
56
|
+
tactus/primitives/__init__.py,sha256=x6bGwoa9DizKUwqsg7SqURfJxisEdctTCv1XnSAZxIk,1709
|
|
57
57
|
tactus/primitives/control.py,sha256=PjRt_Pegcj2L1Uy-IUBQKTYFRMXy7b9q1z2kzJNH8qw,4683
|
|
58
58
|
tactus/primitives/file.py,sha256=-kz0RCst_i_3V860-LtGntYpE0Mm371U_KGHqELbMx0,7186
|
|
59
|
-
tactus/primitives/handles.py,sha256=
|
|
59
|
+
tactus/primitives/handles.py,sha256=_9PbulcvRVUgPCnjKzRW7a_I9O2M13t6WdNjx1vYuwI,13013
|
|
60
60
|
tactus/primitives/host.py,sha256=a3THKAWqH2amNHlbk5-rvaumKBLPnEWw-Ipdp8e_tCk,3302
|
|
61
61
|
tactus/primitives/human.py,sha256=yjh5LF4PNeKaFgMWMVJd-qkp9XSfNqQM4n4X-Qg60Ow,12397
|
|
62
62
|
tactus/primitives/json.py,sha256=XQQQEwUvix_Djscq_thBTHeCf5VCex48rj4m6yp4f7Y,5722
|
|
@@ -64,10 +64,9 @@ tactus/primitives/log.py,sha256=8fNGZnvJi3R0BKacs9kMzhJKCkgQKKdQ_jQmF6XwqIY,6429
|
|
|
64
64
|
tactus/primitives/message_history.py,sha256=JF0pGK1j6HBcMcY05l47-gnNOTmwHLetFuOaWls7mvc,4765
|
|
65
65
|
tactus/primitives/model.py,sha256=NmMk0YdlWd_qTOqwy0WeY0sLXWVbab1w0HvIsY3bBvY,5088
|
|
66
66
|
tactus/primitives/procedure.py,sha256=AnZGRKWijMqTwH3zS-nYLJ3XuRpJNHVQlIC2v3tyweg,19294
|
|
67
|
-
tactus/primitives/procedure_callable.py,sha256=
|
|
67
|
+
tactus/primitives/procedure_callable.py,sha256=Nl0F0dYxqycatpDIBbcmqJKeMQVbulu-ZpsjcEqtYsc,13825
|
|
68
68
|
tactus/primitives/retry.py,sha256=xBtCQkxep0t8xRBaFxJ_xPTj0Cz71YIUPNwBzYrlPmE,5194
|
|
69
69
|
tactus/primitives/session.py,sha256=MbleCJ8pAeA5LAC0UrohJ4NmceR1_3lw0dQNcHH46VU,4441
|
|
70
|
-
tactus/primitives/stage.py,sha256=BrcnWkEUTDJ-zgihMSHdvr9hf3r_ImhfcSzNQq-hgjM,6369
|
|
71
70
|
tactus/primitives/state.py,sha256=o3rsz-P8R2O66nsYmXOjn54342NIn6ldqTqp9XvgPLI,5618
|
|
72
71
|
tactus/primitives/step.py,sha256=2STt1M_9R0Ga5YHScA5i1eXqqIDI_S_q9E4GSyWhM2Y,7175
|
|
73
72
|
tactus/primitives/system.py,sha256=jIzDLuL8a6owTPokAb7giwKYOxEtxmacntkNzzu8BWU,3350
|
|
@@ -76,12 +75,12 @@ tactus/primitives/tool_handle.py,sha256=x6D4Zi-x-werFVBgB-F3mTtIMRbkYjPq3IBjjs8V
|
|
|
76
75
|
tactus/primitives/toolset.py,sha256=T9DtULPgDX7CGBnfOtEx6SsKEtJPWrKXMOnHJer_spY,7779
|
|
77
76
|
tactus/protocols/__init__.py,sha256=w5PFgHq8ov7BbNKcgCmbPSQ_E9l6F8xwrtxEQ2YSWO4,783
|
|
78
77
|
tactus/protocols/chat_recorder.py,sha256=dswAHpwlxq30GTGKT-ktCIKCaixn5izEMSb7sbiZARE,2074
|
|
79
|
-
tactus/protocols/config.py,sha256=
|
|
78
|
+
tactus/protocols/config.py,sha256=VozGLUQPujGdS1pXhDaYhVOyxClOiNti4gDXdMy8beY,3345
|
|
80
79
|
tactus/protocols/cost.py,sha256=yAGVQiLBJDtu0p9UFRJz1a0QTGpdBOJMnKO8GF5yFAM,988
|
|
81
80
|
tactus/protocols/hitl.py,sha256=uzlZXKBYyzuOBRb2dYDPlICjmobwIAzNSaTuhQ0M1mc,2209
|
|
82
81
|
tactus/protocols/log_handler.py,sha256=Ps5wnYRrPjapPA91MJF_G4nOUy8ESKNCSi4od_W0Deg,755
|
|
83
82
|
tactus/protocols/models.py,sha256=GModDKf3jakGAYK89W5umSGt1rXWi_b79CFuNPziNLQ,15930
|
|
84
|
-
tactus/protocols/result.py,sha256=
|
|
83
|
+
tactus/protocols/result.py,sha256=mXFH6M_084O39pTI5QNH5PtYq6Tan252ANuwVXK8QOk,1014
|
|
85
84
|
tactus/protocols/storage.py,sha256=LxPs41cW-8NLAckgxfkP2IBKYuwXJQeIwDqotcZcjys,2607
|
|
86
85
|
tactus/providers/__init__.py,sha256=TxrWR1IXi7iUTA1I8YgXQs32oYrl_O8dX-SLKV08uSQ,483
|
|
87
86
|
tactus/providers/base.py,sha256=apa8j5aOHl5ekBmyCBvUzs8nVeFwLdTcBEpLCaYbUDU,2343
|
|
@@ -105,27 +104,27 @@ tactus/stdlib/io/hdf5.py,sha256=7ELLaQZI1GOsycU1a60J6RTPNLH7EMdaPAYlNx0dQLA,3025
|
|
|
105
104
|
tactus/stdlib/io/json.py,sha256=P6C6rIwAxY97MivCanxKF8TmRotIUxBlHcuv8etmLu8,2641
|
|
106
105
|
tactus/stdlib/io/parquet.py,sha256=hycr0pjqysjhggHx7_UZJL_jkeP1wz8BCozL39EWk-0,2045
|
|
107
106
|
tactus/stdlib/io/tsv.py,sha256=456V2g-dp0mOTxo0ojM-rQl-LlmeV6WAVh0HmEDd_kQ,2350
|
|
108
|
-
tactus/stdlib/tac/tactus/tools/done.tac,sha256=
|
|
109
|
-
tactus/stdlib/tac/tactus/tools/log.tac,sha256=
|
|
110
|
-
tactus/testing/README.md,sha256=
|
|
107
|
+
tactus/stdlib/tac/tactus/tools/done.tac,sha256=_PobbaUQY2PUZg-qy2eJ2jhdx2-UllePnvW_tFdGFao,729
|
|
108
|
+
tactus/stdlib/tac/tactus/tools/log.tac,sha256=sNGYUSkehvKmrgag1b8rHpDME09MQbL4qkt9Kfd0jgg,1389
|
|
109
|
+
tactus/testing/README.md,sha256=fUumwbVC56d7ZB2srAKSb7XxQ0vHFKPbZz70Zv59KRY,6840
|
|
111
110
|
tactus/testing/__init__.py,sha256=M5b3r9E0vkltfhqfIOSASk-qp6fDnm3FBxc9dDBPUhU,1540
|
|
112
|
-
tactus/testing/behave_integration.py,sha256=
|
|
113
|
-
tactus/testing/context.py,sha256=
|
|
111
|
+
tactus/testing/behave_integration.py,sha256=mU54gUDIPggxIlBc5vSKm3xL7C5n-Ih8zi-BbspnTzo,15544
|
|
112
|
+
tactus/testing/context.py,sha256=liNZ4VKD2Dq5NgsKXHBI15H7NJ3gA3a0nyWgz1a3i5Q,18553
|
|
114
113
|
tactus/testing/eval_models.py,sha256=UI3geZp4vilbn3Jt4Mjy95luRVON3T4sGnAwlpb7jLo,3540
|
|
115
114
|
tactus/testing/evaluation_runner.py,sha256=_wemv2yf-N6wjIyhwxVJyoH4FABlKoBv-OKTcgwNm0Q,6908
|
|
116
115
|
tactus/testing/evaluators.py,sha256=NW_LHhssdMRYCCoYmtJIsst-DEsk8iBVebsxRyHx7I0,20751
|
|
117
116
|
tactus/testing/events.py,sha256=7YNLoOKF1QT_0ZWVC0H7yjS-yIIkUdqDj54JjP8Ldy4,2694
|
|
118
117
|
tactus/testing/gherkin_parser.py,sha256=xcu4FjtKk5Vfn_qdcCIZryIKFsENs63Iz-hCiitsmJI,4094
|
|
119
|
-
tactus/testing/mock_agent.py,sha256=
|
|
118
|
+
tactus/testing/mock_agent.py,sha256=z8AAZkD_lj59fBW7wRD0ahmw7aHytH43nqxH-9DGwcs,10801
|
|
120
119
|
tactus/testing/mock_dependencies.py,sha256=saGukLaq46uzz995TYcNDgz7LONxUgMJNkd8DXGUNP0,6970
|
|
121
120
|
tactus/testing/mock_hitl.py,sha256=kJUjJarHyPCxsZq7llO4zFNMuktB6tKLuCRNweFlgKY,5586
|
|
122
121
|
tactus/testing/mock_registry.py,sha256=9PFlUuUxjCgZUR1a7wnxqwLiC_gpyO0vuUl1H5dDieI,5699
|
|
123
122
|
tactus/testing/mock_tools.py,sha256=i0rBoSZ6Y0YG9vQo9ZzKmcEOau-VJ6T4HzOm8hg1Y2A,4009
|
|
124
123
|
tactus/testing/models.py,sha256=67cuTRokX6hfLqo6H4lZ49K0V1u9xM5pFQTzpPtZqmQ,3258
|
|
125
124
|
tactus/testing/pydantic_eval_runner.py,sha256=IBSQD_UQ9YTX4Q3BdmtcLtWxF1EeC70LfsTC-2dY1lg,17822
|
|
126
|
-
tactus/testing/test_runner.py,sha256=
|
|
125
|
+
tactus/testing/test_runner.py,sha256=cnMv9bnKiWhBqYTG6lhMLhrnYJL3uOAJDmkLbPAkiFM,18812
|
|
127
126
|
tactus/testing/steps/__init__.py,sha256=oitGDW-M3uckHk8ySLnjCHi6VjCr6L4MDT2_uPYgR-8,257
|
|
128
|
-
tactus/testing/steps/builtin.py,sha256=
|
|
127
|
+
tactus/testing/steps/builtin.py,sha256=sntZutWoTEF7hkeZHbfM7_iIQEzk_IbyM9svJrsL9JE,31663
|
|
129
128
|
tactus/testing/steps/custom.py,sha256=d1xOWuim-Yoecq2b8cjWpDjkVZ-Gi6emURdstj9nLnA,2053
|
|
130
129
|
tactus/testing/steps/registry.py,sha256=o5DIYas4zRdedX9hLYIHfJcufMbtOGNp2U9Kn9sfB9M,2103
|
|
131
130
|
tactus/tracing/__init__.py,sha256=32Uc7ACuxBfstNh7t2A4q2mub-PGR_zB-02mNH5f_0s,142
|
|
@@ -140,7 +139,7 @@ tactus/validation/LuaParserBase.py,sha256=o3klCIY0ANkVCU0VHml0IOYE4CdEledeoyoIAP
|
|
|
140
139
|
tactus/validation/README.md,sha256=AS6vr4blY7IKWRsj4wuvWBHVMTc5fto7IgNmv-Rjkdo,5366
|
|
141
140
|
tactus/validation/__init__.py,sha256=rnap-YvNievWigYYUewuXBcLtAdjZ8YpeJDYS1T7XZM,153
|
|
142
141
|
tactus/validation/error_listener.py,sha256=ANaQHPzRSGQMgreYqZ4ZvIKGENj55FnrEQYUmqFvGaY,619
|
|
143
|
-
tactus/validation/semantic_visitor.py,sha256=
|
|
142
|
+
tactus/validation/semantic_visitor.py,sha256=ts24kyfD3zhrsU0TBbQRZdBgQFaYbc5QV7MaiIKnpYQ,37446
|
|
144
143
|
tactus/validation/validator.py,sha256=Vut4nWoNVbm1n_RRbdLVLJyBb6S29KjnxXi-SrRQd3Y,4842
|
|
145
144
|
tactus/validation/generated/LuaLexer.interp,sha256=B-Xb6HNXS7YYYQB_cvsWzf8OQLFnEhZHDN5vCOyP3yw,20444
|
|
146
145
|
tactus/validation/generated/LuaLexer.py,sha256=6B-HNB_vAp3bA5iACLvMWw0R4KFENsuiG7bccysxbRQ,67252
|
|
@@ -154,8 +153,8 @@ tactus/validation/generated/LuaParserVisitor.py,sha256=ageKSmHPxnO3jBS2fBtkmYBOd
|
|
|
154
153
|
tactus/validation/generated/__init__.py,sha256=5gWlwRI0UvmHw2fnBpj_IG6N8oZeabr5tbj1AODDvjc,196
|
|
155
154
|
tactus/validation/grammar/LuaLexer.g4,sha256=t2MXiTCr127RWAyQGvamkcU_m4veqPzSuHUtAKwalw4,2771
|
|
156
155
|
tactus/validation/grammar/LuaParser.g4,sha256=ceZenb90BdiZmVdOxMGj9qJk3QbbWVZe5HUqPgoePfY,3202
|
|
157
|
-
tactus-0.
|
|
158
|
-
tactus-0.
|
|
159
|
-
tactus-0.
|
|
160
|
-
tactus-0.
|
|
161
|
-
tactus-0.
|
|
156
|
+
tactus-0.31.1.dist-info/METADATA,sha256=Rmp1DSHekY6Jzb_QBNWG6f-_mkLd8M_KqU4D6EUe6fA,58693
|
|
157
|
+
tactus-0.31.1.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
158
|
+
tactus-0.31.1.dist-info/entry_points.txt,sha256=vWseqty8m3z-Worje0IYxlioMjPDCoSsm0AtY4GghBY,47
|
|
159
|
+
tactus-0.31.1.dist-info/licenses/LICENSE,sha256=ivohBcAIYnaLPQ-lKEeCXSMvQUVISpQfKyxHBHoa4GA,1066
|
|
160
|
+
tactus-0.31.1.dist-info/RECORD,,
|
tactus/primitives/stage.py
DELETED
|
@@ -1,202 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
Stage Primitive - Workflow progress tracking.
|
|
3
|
-
|
|
4
|
-
Provides:
|
|
5
|
-
- Stage.current() - Get current stage name
|
|
6
|
-
- Stage.set(stage) - Set current stage
|
|
7
|
-
- Stage.advance() - Move to next stage
|
|
8
|
-
- Stage.is(stage) - Check if in specific stage
|
|
9
|
-
- Stage.history() - Get stage transition history
|
|
10
|
-
"""
|
|
11
|
-
|
|
12
|
-
import logging
|
|
13
|
-
from typing import List, Optional, Dict, Any
|
|
14
|
-
from datetime import datetime, timezone
|
|
15
|
-
|
|
16
|
-
logger = logging.getLogger(__name__)
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
class StagePrimitive:
|
|
20
|
-
"""
|
|
21
|
-
Manages workflow stage tracking for procedures.
|
|
22
|
-
|
|
23
|
-
Enables workflows to:
|
|
24
|
-
- Track current workflow stage
|
|
25
|
-
- Validate stage transitions
|
|
26
|
-
- Query stage state
|
|
27
|
-
- Maintain stage history
|
|
28
|
-
"""
|
|
29
|
-
|
|
30
|
-
def __init__(self, declared_stages: Optional[List[str]] = None, lua_sandbox=None):
|
|
31
|
-
"""
|
|
32
|
-
Initialize Stage primitive.
|
|
33
|
-
|
|
34
|
-
Args:
|
|
35
|
-
declared_stages: List of valid stage names from YAML config
|
|
36
|
-
lua_sandbox: LuaSandbox for creating Lua tables (optional)
|
|
37
|
-
"""
|
|
38
|
-
self.declared_stages = declared_stages or []
|
|
39
|
-
self.lua_sandbox = lua_sandbox
|
|
40
|
-
self._current_stage: Optional[str] = None
|
|
41
|
-
self._history: List[Dict[str, Any]] = []
|
|
42
|
-
logger.debug(f"StagePrimitive initialized with stages: {self.declared_stages}")
|
|
43
|
-
|
|
44
|
-
def current(self) -> Optional[str]:
|
|
45
|
-
"""
|
|
46
|
-
Get current stage name.
|
|
47
|
-
|
|
48
|
-
Returns:
|
|
49
|
-
Current stage name or None if not set
|
|
50
|
-
|
|
51
|
-
Example (Lua):
|
|
52
|
-
local stage = Stage.current()
|
|
53
|
-
if stage == "processing" then
|
|
54
|
-
Log.info("Currently processing")
|
|
55
|
-
end
|
|
56
|
-
"""
|
|
57
|
-
logger.debug(f"Stage.current() = {self._current_stage}")
|
|
58
|
-
return self._current_stage
|
|
59
|
-
|
|
60
|
-
def set(self, stage: str) -> None:
|
|
61
|
-
"""
|
|
62
|
-
Set current stage.
|
|
63
|
-
|
|
64
|
-
Args:
|
|
65
|
-
stage: Stage name to set
|
|
66
|
-
|
|
67
|
-
Raises:
|
|
68
|
-
ValueError: If stage not in declared stages list
|
|
69
|
-
|
|
70
|
-
Example (Lua):
|
|
71
|
-
Stage.set("processing")
|
|
72
|
-
Log.info("Moved to processing stage")
|
|
73
|
-
"""
|
|
74
|
-
# Validate stage if we have a declared list
|
|
75
|
-
if self.declared_stages and stage not in self.declared_stages:
|
|
76
|
-
valid_stages = ", ".join(self.declared_stages)
|
|
77
|
-
error_msg = f"Invalid stage '{stage}'. Valid stages: {valid_stages}"
|
|
78
|
-
logger.error(error_msg)
|
|
79
|
-
raise ValueError(error_msg)
|
|
80
|
-
|
|
81
|
-
old_stage = self._current_stage
|
|
82
|
-
self._current_stage = stage
|
|
83
|
-
|
|
84
|
-
# Record transition in history
|
|
85
|
-
self._history.append(
|
|
86
|
-
{
|
|
87
|
-
"from_stage": old_stage,
|
|
88
|
-
"to_stage": stage,
|
|
89
|
-
"timestamp": datetime.now(timezone.utc).isoformat(),
|
|
90
|
-
}
|
|
91
|
-
)
|
|
92
|
-
|
|
93
|
-
logger.info(f"Stage transition: {old_stage} -> {stage}")
|
|
94
|
-
|
|
95
|
-
def advance(self) -> Optional[str]:
|
|
96
|
-
"""
|
|
97
|
-
Move to next stage in declared sequence.
|
|
98
|
-
|
|
99
|
-
Returns:
|
|
100
|
-
New current stage name, or None if at end
|
|
101
|
-
|
|
102
|
-
Raises:
|
|
103
|
-
ValueError: If current stage not set or not in declared stages
|
|
104
|
-
|
|
105
|
-
Example (Lua):
|
|
106
|
-
Stage.set("setup")
|
|
107
|
-
-- ... do work ...
|
|
108
|
-
Stage.advance() -- Moves to next stage in sequence
|
|
109
|
-
Log.info("Advanced to", {stage = Stage.current()})
|
|
110
|
-
"""
|
|
111
|
-
if not self._current_stage:
|
|
112
|
-
raise ValueError("Cannot advance: no current stage set. Call Stage.set() first.")
|
|
113
|
-
|
|
114
|
-
if not self.declared_stages:
|
|
115
|
-
raise ValueError("Cannot advance: no stages declared in procedure config")
|
|
116
|
-
|
|
117
|
-
try:
|
|
118
|
-
current_index = self.declared_stages.index(self._current_stage)
|
|
119
|
-
except ValueError:
|
|
120
|
-
raise ValueError(
|
|
121
|
-
f"Current stage '{self._current_stage}' not in declared stages: {self.declared_stages}"
|
|
122
|
-
)
|
|
123
|
-
|
|
124
|
-
# Check if there's a next stage
|
|
125
|
-
if current_index >= len(self.declared_stages) - 1:
|
|
126
|
-
logger.warning(f"Cannot advance: already at final stage '{self._current_stage}'")
|
|
127
|
-
return None
|
|
128
|
-
|
|
129
|
-
# Move to next stage
|
|
130
|
-
next_stage = self.declared_stages[current_index + 1]
|
|
131
|
-
self.set(next_stage)
|
|
132
|
-
return next_stage
|
|
133
|
-
|
|
134
|
-
def is_current(self, stage: str) -> bool:
|
|
135
|
-
"""
|
|
136
|
-
Check if currently in specific stage.
|
|
137
|
-
|
|
138
|
-
Args:
|
|
139
|
-
stage: Stage name to check
|
|
140
|
-
|
|
141
|
-
Returns:
|
|
142
|
-
True if current stage matches, False otherwise
|
|
143
|
-
|
|
144
|
-
Example (Lua):
|
|
145
|
-
if Stage.is("processing") then -- 'is' is mapped to is_current()
|
|
146
|
-
Log.info("Currently processing")
|
|
147
|
-
end
|
|
148
|
-
"""
|
|
149
|
-
result = self._current_stage == stage
|
|
150
|
-
logger.debug(f"Stage.is('{stage}') = {result} (current: {self._current_stage})")
|
|
151
|
-
return result
|
|
152
|
-
|
|
153
|
-
def history(self):
|
|
154
|
-
"""
|
|
155
|
-
Get stage transition history.
|
|
156
|
-
|
|
157
|
-
Returns:
|
|
158
|
-
Lua table (if lua_sandbox available) or Python list of transition records
|
|
159
|
-
|
|
160
|
-
Example (Lua):
|
|
161
|
-
local history = Stage.history()
|
|
162
|
-
for i, transition in ipairs(history) do
|
|
163
|
-
Log.debug("Transition", {
|
|
164
|
-
from = transition.from_stage,
|
|
165
|
-
to = transition.to_stage,
|
|
166
|
-
timestamp = transition.timestamp
|
|
167
|
-
})
|
|
168
|
-
end
|
|
169
|
-
"""
|
|
170
|
-
logger.debug(f"Retrieved {len(self._history)} stage transitions")
|
|
171
|
-
|
|
172
|
-
# If lua_sandbox available, create proper Lua table
|
|
173
|
-
if self.lua_sandbox:
|
|
174
|
-
lua_table = self.lua_sandbox.lua.table()
|
|
175
|
-
for i, transition in enumerate(self._history, start=1):
|
|
176
|
-
lua_table[i] = transition.copy() # Lua uses 1-based indexing
|
|
177
|
-
return lua_table
|
|
178
|
-
else:
|
|
179
|
-
# Fallback: return list
|
|
180
|
-
return [transition.copy() for transition in self._history]
|
|
181
|
-
|
|
182
|
-
def count(self) -> int:
|
|
183
|
-
"""
|
|
184
|
-
Get count of stage transitions.
|
|
185
|
-
|
|
186
|
-
Returns:
|
|
187
|
-
Number of transitions in history
|
|
188
|
-
"""
|
|
189
|
-
return len(self._history)
|
|
190
|
-
|
|
191
|
-
def clear_history(self) -> None:
|
|
192
|
-
"""
|
|
193
|
-
Clear stage transition history (mainly for testing).
|
|
194
|
-
|
|
195
|
-
Note: Does not affect current stage.
|
|
196
|
-
"""
|
|
197
|
-
count = len(self._history)
|
|
198
|
-
self._history.clear()
|
|
199
|
-
logger.debug(f"Cleared {count} stage transitions from history")
|
|
200
|
-
|
|
201
|
-
def __repr__(self) -> str:
|
|
202
|
-
return f"StagePrimitive(current={self._current_stage}, stages={self.declared_stages})"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|