agentic-devtools 0.2.654__py3-none-any.whl → 0.2.656__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.
- agentic_devtools/_version.py +2 -2
- agentic_devtools/cli/ci/agent_task_lifecycle.py +3 -1
- agentic_devtools/cli/ci/agent_task_pr_identity.py +74 -0
- agentic_devtools/cli/ci/pipeline/markdown_comments.py +31 -0
- {agentic_devtools-0.2.654.dist-info → agentic_devtools-0.2.656.dist-info}/METADATA +1 -1
- {agentic_devtools-0.2.654.dist-info → agentic_devtools-0.2.656.dist-info}/RECORD +9 -7
- {agentic_devtools-0.2.654.dist-info → agentic_devtools-0.2.656.dist-info}/WHEEL +0 -0
- {agentic_devtools-0.2.654.dist-info → agentic_devtools-0.2.656.dist-info}/entry_points.txt +0 -0
- {agentic_devtools-0.2.654.dist-info → agentic_devtools-0.2.656.dist-info}/licenses/LICENSE +0 -0
agentic_devtools/_version.py
CHANGED
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '0.2.
|
|
22
|
-
__version_tuple__ = version_tuple = (0, 2,
|
|
21
|
+
__version__ = version = '0.2.656'
|
|
22
|
+
__version_tuple__ = version_tuple = (0, 2, 656)
|
|
23
23
|
|
|
24
24
|
__commit_id__ = commit_id = None
|
|
@@ -3,11 +3,12 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
5
|
from collections.abc import Iterable, Mapping
|
|
6
|
-
from dataclasses import dataclass, replace
|
|
6
|
+
from dataclasses import dataclass, field, replace
|
|
7
7
|
from datetime import UTC, datetime
|
|
8
8
|
|
|
9
9
|
from .agent_task_inventory import AgentTaskInventoryLoadResult
|
|
10
10
|
from .agent_task_lifecycle_raw_evidence import raw_lifecycle_artifact_scope_matches
|
|
11
|
+
from .agent_task_pr_identity import AgentTaskPrIdentity
|
|
11
12
|
|
|
12
13
|
|
|
13
14
|
@dataclass(frozen=True)
|
|
@@ -38,6 +39,7 @@ class AgentTaskLifecycle:
|
|
|
38
39
|
workflow_run_id: str = ""
|
|
39
40
|
started_at: str = ""
|
|
40
41
|
idle_at: str = ""
|
|
42
|
+
pr_identity: AgentTaskPrIdentity = field(default_factory=AgentTaskPrIdentity)
|
|
41
43
|
|
|
42
44
|
|
|
43
45
|
@dataclass(frozen=True)
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"""Typed PR identity provenance for Agent Task lifecycle evidence."""
|
|
2
|
+
|
|
3
|
+
from dataclasses import dataclass
|
|
4
|
+
from enum import StrEnum
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class AgentTaskPrIdentityKind(StrEnum):
|
|
8
|
+
"""How an Agent Task is associated with a requested pull request."""
|
|
9
|
+
|
|
10
|
+
PR_NUMBER = "pr_number"
|
|
11
|
+
PR_DATABASE_ID = "pr_database_id"
|
|
12
|
+
BRANCH_ONLY = "branch_only"
|
|
13
|
+
NONE = "none"
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@dataclass(frozen=True)
|
|
17
|
+
class AgentTaskPrIdentity:
|
|
18
|
+
"""Correlation details without treating branch-only evidence as verified identity."""
|
|
19
|
+
|
|
20
|
+
kind: AgentTaskPrIdentityKind = AgentTaskPrIdentityKind.NONE
|
|
21
|
+
correlates: bool = False
|
|
22
|
+
task_pr_number: int | None = None
|
|
23
|
+
task_branch: str = ""
|
|
24
|
+
|
|
25
|
+
@property
|
|
26
|
+
def is_verified_pr_identity(self) -> bool:
|
|
27
|
+
"""Return whether exact PR-number or database-ID evidence matched."""
|
|
28
|
+
return self.kind in {
|
|
29
|
+
AgentTaskPrIdentityKind.PR_NUMBER,
|
|
30
|
+
AgentTaskPrIdentityKind.PR_DATABASE_ID,
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def resolve_agent_task_pr_identity(
|
|
35
|
+
*,
|
|
36
|
+
requested_pr_number: int,
|
|
37
|
+
task_pr_number: int | None,
|
|
38
|
+
requested_pr_database_id: int | None,
|
|
39
|
+
task_pr_database_id: int | str | None,
|
|
40
|
+
requested_head_branch: str,
|
|
41
|
+
task_branch: str,
|
|
42
|
+
) -> AgentTaskPrIdentity:
|
|
43
|
+
"""Classify exact PR identity, branch-only correlation, or no match."""
|
|
44
|
+
normalized_task_branch = task_branch.removeprefix("refs/heads/")
|
|
45
|
+
normalized_task_pr_database_id = task_pr_database_id
|
|
46
|
+
if isinstance(task_pr_database_id, str) and task_pr_database_id.isascii() and task_pr_database_id.isdigit():
|
|
47
|
+
try:
|
|
48
|
+
normalized_task_pr_database_id = int(task_pr_database_id)
|
|
49
|
+
except ValueError:
|
|
50
|
+
normalized_task_pr_database_id = None
|
|
51
|
+
|
|
52
|
+
if type(requested_pr_number) is int and type(task_pr_number) is int and task_pr_number == requested_pr_number:
|
|
53
|
+
kind = AgentTaskPrIdentityKind.PR_NUMBER
|
|
54
|
+
elif (
|
|
55
|
+
type(requested_pr_database_id) is int
|
|
56
|
+
and type(normalized_task_pr_database_id) is int
|
|
57
|
+
and normalized_task_pr_database_id == requested_pr_database_id
|
|
58
|
+
):
|
|
59
|
+
kind = AgentTaskPrIdentityKind.PR_DATABASE_ID
|
|
60
|
+
elif requested_head_branch and normalized_task_branch == requested_head_branch.removeprefix("refs/heads/"):
|
|
61
|
+
kind = AgentTaskPrIdentityKind.BRANCH_ONLY
|
|
62
|
+
else:
|
|
63
|
+
kind = AgentTaskPrIdentityKind.NONE
|
|
64
|
+
|
|
65
|
+
normalized_pr_number = task_pr_number
|
|
66
|
+
if kind is AgentTaskPrIdentityKind.PR_DATABASE_ID:
|
|
67
|
+
normalized_pr_number = requested_pr_number
|
|
68
|
+
|
|
69
|
+
return AgentTaskPrIdentity(
|
|
70
|
+
kind=kind,
|
|
71
|
+
correlates=kind is not AgentTaskPrIdentityKind.NONE,
|
|
72
|
+
task_pr_number=normalized_pr_number,
|
|
73
|
+
task_branch=normalized_task_branch,
|
|
74
|
+
)
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"""Lexical scanning for Markdown HTML-comment delimiter tokens."""
|
|
2
|
+
|
|
3
|
+
from dataclasses import dataclass
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
@dataclass(frozen=True)
|
|
7
|
+
class CommentToken:
|
|
8
|
+
"""An HTML-comment delimiter and its position on one physical line."""
|
|
9
|
+
|
|
10
|
+
line_number: int
|
|
11
|
+
column: int
|
|
12
|
+
kind: str
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def scan_comment_tokens(line: str, line_number: int) -> tuple[CommentToken, ...]:
|
|
16
|
+
"""Return exact HTML-comment delimiters in source order for one line."""
|
|
17
|
+
if line_number <= 0:
|
|
18
|
+
raise ValueError("line_number must be a positive integer")
|
|
19
|
+
|
|
20
|
+
tokens = []
|
|
21
|
+
offset = 0
|
|
22
|
+
while offset < len(line):
|
|
23
|
+
if line.startswith("<!--", offset):
|
|
24
|
+
tokens.append(CommentToken(line_number, offset, "open"))
|
|
25
|
+
offset += 4
|
|
26
|
+
elif line.startswith("-->", offset):
|
|
27
|
+
tokens.append(CommentToken(line_number, offset, "close"))
|
|
28
|
+
offset += 3
|
|
29
|
+
else:
|
|
30
|
+
offset += 1
|
|
31
|
+
return tuple(tokens)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
agentic_devtools/__init__.py,sha256=gvLzsZ6L3Abr4sPHr4OJ_rdZDD8cFzXacaV0LGs8dVc,539
|
|
2
|
-
agentic_devtools/_version.py,sha256=
|
|
2
|
+
agentic_devtools/_version.py,sha256=jnIQpoO33KBqGyMUZBpGXojzzc89HmiPYgP1kAtgmfE,524
|
|
3
3
|
agentic_devtools/agdt_gitignore.py,sha256=vVVqTjBZ_ijn6U3Lnh_JGrARLschYVN-fFal9jDk0Ak,2694
|
|
4
4
|
agentic_devtools/background_tasks.py,sha256=sFgmqOnCdCjclABJ8V__yDwBXDyi45b1Z-MVv3G2zB8,17664
|
|
5
5
|
agentic_devtools/config.py,sha256=DEVxTVZhsQbVQwO9qdB_1h19aBpjMzF6xJY_ePYLGLs,15629
|
|
@@ -235,9 +235,10 @@ agentic_devtools/cli/ci/ado_provider_repair_dispatch.py,sha256=HqZ-AhIx8OAB_0yz5
|
|
|
235
235
|
agentic_devtools/cli/ci/agent_assignment.py,sha256=xALWk47PMo2uW44kgMm6K7EXfQN5NCv3zyyzWScIAfE,46026
|
|
236
236
|
agentic_devtools/cli/ci/agent_task_diagnostics.py,sha256=7kVeBKqHn3h4yOXO3sTskOW1NuRj2uMAUYuhIAXRlGE,4306
|
|
237
237
|
agentic_devtools/cli/ci/agent_task_inventory.py,sha256=62vNJb45du4TvDmiCfizwB3K56jcYvA7MM1TBbsSzIo,15516
|
|
238
|
-
agentic_devtools/cli/ci/agent_task_lifecycle.py,sha256=
|
|
238
|
+
agentic_devtools/cli/ci/agent_task_lifecycle.py,sha256=yCbQT2C4gJp750PugtAw03VVGcaGG6q3dFkgzAjTFz8,19206
|
|
239
239
|
agentic_devtools/cli/ci/agent_task_lifecycle_assessment.py,sha256=wZLwtt0oDjksaTE7Ail5nI20arxjYrVZmDE9Ew-B3AQ,3007
|
|
240
240
|
agentic_devtools/cli/ci/agent_task_lifecycle_raw_evidence.py,sha256=LGCmZ4zpxNWXP8X5uJR5lpdmPof6R_v5_whnDc--fwo,2703
|
|
241
|
+
agentic_devtools/cli/ci/agent_task_pr_identity.py,sha256=kFAiSlBPD18YhsV3mdhho8KEGhUjEfa-jXMrmmolv64,2674
|
|
241
242
|
agentic_devtools/cli/ci/approver_preflight.py,sha256=uM_LF0qrf_nMyGJT8CUvdqh0comD_AAsS9Sw_9HqBTA,5865
|
|
242
243
|
agentic_devtools/cli/ci/canonical_dispatch_identity.py,sha256=VmWs3eHBs6HU2IRV_ngMUzk24pZJVE1KBFahtTvGZPA,2799
|
|
243
244
|
agentic_devtools/cli/ci/commands.py,sha256=REVb_t8Ei4F37JmAn57FafIwzBa_u7PNhKkJHvchx5o,27282
|
|
@@ -342,6 +343,7 @@ agentic_devtools/cli/ci/pipeline/exceptions.py,sha256=4UXy2weeQZex_lp4sILNxlYfGj
|
|
|
342
343
|
agentic_devtools/cli/ci/pipeline/exclusion.py,sha256=mrOG5G1-m3U-GM4YgtMTuzmoj02TXB6GbNxemRoLtV4,931
|
|
343
344
|
agentic_devtools/cli/ci/pipeline/gate_verdict.py,sha256=-vbp24Kr172wXpB5T-y9lm-7JxiYurixEu3-nuZohgY,44352
|
|
344
345
|
agentic_devtools/cli/ci/pipeline/lifecycle_reconciliation_support.py,sha256=R15VC18-xSUEMoTtI8y9z5xYIFLWloWXAvnDPSSPtvM,2405
|
|
346
|
+
agentic_devtools/cli/ci/pipeline/markdown_comments.py,sha256=nNGHpAWwLtXbe8Vg4cmZSziXJ-FD_Fcv8todJvBGfY8,929
|
|
345
347
|
agentic_devtools/cli/ci/pipeline/models.py,sha256=jKuSunZ8FDsVFbIUwLkMVZdfVun9bc_SKvcxLW7s9Ls,4501
|
|
346
348
|
agentic_devtools/cli/ci/pipeline/repair_attempts.py,sha256=K9JgsxIW0CjxfV6PMmZRKd6w7qsTYClZvzwFSu7shsA,11054
|
|
347
349
|
agentic_devtools/cli/ci/pipeline/runner.py,sha256=0lXe0sr8GB9VWejOIHZimWy9GF_obRFn9agO-ugCWgM,76902
|
|
@@ -1343,8 +1345,8 @@ agentic_devtools/_bundled_skills/skills/speckit-plan/SKILL.md,sha256=qYLpzgLCIZ6
|
|
|
1343
1345
|
agentic_devtools/_bundled_skills/skills/speckit-specify/SKILL.md,sha256=HbHRbdphMqbtNw6fL6NcYCj6sSFmUyk2S4U0bZ9p_l4,13681
|
|
1344
1346
|
agentic_devtools/_bundled_skills/skills/write-github-commit-message/SKILL.md,sha256=Ep1lR8NDN117Iytj172VZgqazFiLpJ56Z7RXgaTnxR8,2626
|
|
1345
1347
|
agentic_devtools/_bundled_skills/skills/write-github-commit-message/commit-types.md,sha256=bTy_t68ZD6R87rFIzq9wybTu8Wudoahb7nB9IWC4bFo,1839
|
|
1346
|
-
agentic_devtools-0.2.
|
|
1347
|
-
agentic_devtools-0.2.
|
|
1348
|
-
agentic_devtools-0.2.
|
|
1349
|
-
agentic_devtools-0.2.
|
|
1350
|
-
agentic_devtools-0.2.
|
|
1348
|
+
agentic_devtools-0.2.656.dist-info/METADATA,sha256=lvvmgROcbnku9mgroCrf3wKymB7eNbFCFAwexMsUW9M,35594
|
|
1349
|
+
agentic_devtools-0.2.656.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
|
|
1350
|
+
agentic_devtools-0.2.656.dist-info/entry_points.txt,sha256=oHUiF-YvDtXSMTUh0E2bwYKGn4hZlIVbBRaQGSFXASc,13696
|
|
1351
|
+
agentic_devtools-0.2.656.dist-info/licenses/LICENSE,sha256=yBEDdICksxhBYLWoERKp9MTqwGnUF6Ryj9BTLwXTc6k,1082
|
|
1352
|
+
agentic_devtools-0.2.656.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|