Skip to content

feat: export install-source helpers#393

Merged
thymikee merged 2 commits intomainfrom
codex/issue-387-export-install-source
Apr 11, 2026
Merged

feat: export install-source helpers#393
thymikee merged 2 commits intomainfrom
codex/issue-387-export-install-source

Conversation

@thymikee
Copy link
Copy Markdown
Contributor

Summary

  • Worth it: yes. This exposes the canonical SSRF/trust checks and install-source materialization path so downstream consumers can stop carrying security-sensitive copies.
  • Add the agent-device/install-source subpath and rslib entrypoint.
  • Export existing install-source validation, trust, blocked-host/IP, materialization, and archive extension helpers without changing behavior.
  • Add focused coverage through the public entrypoint.

Touched files: 5. Scope stayed within install-source export surface. Docs/skills were not updated because this is a library API export, not CLI behavior.

Closes #387

Validation

  • pnpm install --frozen-lockfile
  • pnpm format
  • pnpm check:tooling
  • git diff --check

Known gaps: none.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f0f322e9a7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

};

const ARCHIVE_EXTENSIONS = ['.zip', '.tar', '.tar.gz', '.tgz'] as const;
export const ARCHIVE_EXTENSIONS = ['.zip', '.tar', '.tar.gz', '.tgz'] as const;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Prevent mutation of exported archive extension list

Exporting ARCHIVE_EXTENSIONS as a live array exposes mutable global state to consumers, and isArchivePath uses that same reference to decide whether files should be treated as archives. In JS (or TS via casts), downstream code can mutate it (for example by adding/removing extensions), which silently changes install-source behavior process-wide and can break or weaken the intended validation path; export a frozen copy or an accessor that returns an immutable list instead.

Useful? React with 👍 / 👎.

@thymikee thymikee force-pushed the codex/issue-387-export-install-source branch from f0f322e to ccc5a14 Compare April 11, 2026 17:38
@thymikee thymikee merged commit 0b76783 into main Apr 11, 2026
15 checks passed
@thymikee thymikee deleted the codex/issue-387-export-install-source branch April 11, 2026 18:00
@github-actions
Copy link
Copy Markdown

PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://callstackincubator.github.io/agent-device/pr-preview/pr-393/

Built to branch gh-pages at 2026-04-11 17:59 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

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.

Export install-source URL validation and trust helpers

1 participant