Skip to content

Synchronized with the latest API changes - #18

Merged
burgaard merged 11 commits into
mainfrom
2026-10-31-api-sync
Nov 1, 2026
Merged

burgaard merged 11 commits into
mainfrom
2026-10-31-api-sync

Conversation

@burgaard

Copy link
Copy Markdown
Contributor

No description provided.

@burgaard burgaard left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review (high effort). No correctness bugs found: tests (1502 passed), mypy, ruff and black are clean, every new query param matches the spec's name and type, and sync and async are symmetric.

Two findings are on lines outside this diff:

  1. seclai/seclai.py:3413-3414 (async: 8276-8277): set_accepted_attachments() docstring is stale. It still says "Only dynamic_input and email_received triggers take files". This spec's SetAcceptedAttachmentsRequest now lists slack_command too, and the PR adds set_slack_trigger_config(). So someone setting up the new Slack trigger is told it can't take attachments.

  2. seclai/seclai.py:2291 (async: 7136): create_agent() docstring doesn't mention the new gallery fields. The new list_agent_examples() docstring says to pass an entry's key as agent_template to create_agent with resource_bindings. But create_agent's body doc still says only "(name, description, etc.)". It doesn't mention agent_template, resource_bindings, create_missing_resources, or the created_resources / solution_id it now returns.

Comment thread tests/test_new_methods.py Resolved
Comment thread tests/test_new_methods.py Resolved
Comment thread seclai/seclai.py Resolved
@burgaard

Copy link
Copy Markdown
Contributor Author

On the review summary:

Review 5721565186, body item 1 (set_accepted_attachments() docstring)

Fixed in both classes. The docstring now says dynamic_input, email_received and slack_command triggers take files. That matches the spec's SetAcceptedAttachmentsRequest.accepted_attachments description.

Review 5721565186, body item 2 (create_agent() docstring)

Fixed in both classes.

  • body now describes the gallery flow: an entry's key from list_agent_examples() as agent_template, resource_bindings as {slot: resource_id}, and create_missing_resources.
  • Returns now describes created_resources and solution_id, worded from the spec's field descriptions.

Also changed (cross-SDK finding from the JS review)

  • agent_id: now optional on get_non_manual_evaluation_summary() in both classes, since the spec says "Omit for account-wide". Existing positional calls still work. New tests cover the account-wide call (sync and async), and there are CHANGELOG and README lines.
  • Date range docstrings: corrected against the backend.
    • The summary (_resolve_date_range): start_date alone overrides days, and end_date is ignored without it.
    • Memory-bank stats: only both dates together override days.

Kim Burgaard added 4 commits October 30, 2026 23:32
…19cd

aea19cd Updated skills

git-subtree-dir: .claude/skills/seclai-changelog
git-subtree-split: aea19cd492abe95322e1066cee228c529b9e2db4
5b4e063 Updated skills
14a086e Addressed review comments
4a9410f Addressed review comments
683ba85 Addressed review comments
f16043e Addressed review comments
9f5a04b More audit tool fixes
20f845d Addressed review comments
77cecda Updated the audit-tool

git-subtree-dir: .claude/skills/seclai-sdk-sync
git-subtree-split: 5b4e0631ddc4763967fcb2bf25c1623709a7e3dd

@burgaard burgaard left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review of HEAD~1..HEAD (a907cc7, the merge of the seclai-sdk-sync subtree squash 21affe9). That commit is not pushed yet: the PR head is 0977233 and neither changed file is in the PR diff, so the findings are listed here and not as inline comments.

  1. .claude/skills/seclai-sdk-sync/sdksync.py:1235: _ts_wrapped_type slices Omit<…>/Partial<…> with balanced_slice(…, "<", ">"), and that function counts the > of an arrow => as a closing bracket. split_args was fixed for this in the same change. Example: opts: Cfg<{ cb: () => void }> → opts: Partial<Cfg<{ cb: () => void }>> (or any Omit<…> whose type has an arrow) gets cut at =>, the comparison fails, and a compatible change is reported as break, not warn. Fix: skip > when the previous character is = in balanced_slice too, or share one bracket scanner.

  2. .claude/skills/seclai-sdk-sync/SKILL.md:326: The new text says #minor must be in a commit message "(not the PR title)". This repo squash-merges (for example e512db4 "2026 10 21 api sync (#16)"). The squash commit's subject is the PR title, and github-tag-action reads that commit message. A #minor in the PR title therefore counts. The sentence above it also still says the version comes from "the merge commit message", so the note contradicts itself and may stop people from using the simplest place to put the bump.

  3. .claude/skills/seclai-sdk-sync/sdksync.py:342: split_args now handles =>, but every < still opens a level. Go's <-chan T (e.g. ch <-chan Event, opts *Opts) never closes it, so all later commas stay unsplit (split_args("ch <-chan int, x int") → one entry). surface/params then see the wrong arity and report a phantom "parameter list changed". Fix: ignore < when the next character is -.

  4. .claude/skills/seclai-sdk-sync/sdksync.py:1112: strip_comments(…, "#") runs over Python source that includes triple-quoted docstrings. _quoted_end reads """ as an empty "" plus a new quote, and literals only close on the same line. A # in a multi-line docstring is therefore treated as a comment: """doc\n it is #1 "q\n""" becomes it is \n. Signatures are unaffected today. But the stripped text no longer matches the source, and any later scan of this text for strings (or a def inside a docstring) breaks silently. Handle """/''' in _quoted_end.

  5. .claude/skills/seclai-sdk-sync/sdksync.py:1157: _ts_object_members calls strip_comments(body) again. Its only input comes from public_surface, which has already stripped comments from the whole file (line 1112). That is a second full character-by-character pass over every options object on every compare. Drop it, or say the helper accepts raw text and stop stripping upstream.

  6. .claude/skills/seclai-sdk-sync/sdksync.py:423: Comment removal now has two implementations. The new string-aware strip_comments is used for surface. The older regex strip_docs is used for request_blocks/endpoint_helpers/helper_called, does not know about strings, and only removes whole-line comments. params/returns therefore still see trailing // … comments and parens or apostrophes inside them, which is the failure this change fixes for surface. Fix the root cause: run request_blocks and helper detection through strip_comments (with line_comment) as well, and retire strip_docs.

  7. .claude/skills/seclai-sdk-sync/sdksync.py:1227: The same parameter-head regex ([\w$]+\s*\??\s*:\s*) appears in _ts_inline_object (1138) and _ts_wrapped_type (1227). The member regex appears in _ts_object_members and again as _TS_MEMBER_RE. Whitespace normalisation is re-declared as norm = lambda (1249) next to the norm in public_surface and several inline " ".join(x.split()) calls. Move the shared regexes and one _norm helper to module level so they cannot drift apart.

  8. .claude/skills/seclai-sdk-sync/SKILL.md:145: The new WARN bullet packs four rules and their caveats into one sentence, with nested parentheses and semicolons ("never to an empty {}, which accepts any value the new type may reject; every other member unchanged…"). It is hard to tell which condition applies to which case. Split it into a sub-list with one line per compatible change: options-object member, widened to undefined, Omit, Partial.

Kim Burgaard added 4 commits October 30, 2026 23:50
…b9d6

0f1b9d6 Updated skills and guards

git-subtree-dir: .claude/skills/seclai-changelog
git-subtree-split: 0f1b9d67b07b47b69cab19d9ade3fe62687b53a2
f6aa6eb Updated skills and guards

git-subtree-dir: .claude/skills/seclai-sdk-sync
git-subtree-split: f6aa6ebc8a8457cb4b2535e41ee0d1258647d422
@burgaard
burgaard merged commit 2a075e8 into main Nov 1, 2026
1 check passed
@burgaard
burgaard deleted the 2026-10-31-api-sync branch November 1, 2026 03:30
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