Skip to content

Generate TypeScript definitions for safe outputs JSONL types#764

Merged
pelikhan merged 4 commits intomainfrom
copilot/fix-8a81c7fc-b603-4874-93c1-dd2e8a8f383f
Sep 12, 2025
Merged

Generate TypeScript definitions for safe outputs JSONL types#764
pelikhan merged 4 commits intomainfrom
copilot/fix-8a81c7fc-b603-4874-93c1-dd2e8a8f383f

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Sep 12, 2025

This PR addresses the need for TypeScript definitions covering the safe outputs system by providing type definitions for JSONL output items produced by agents.

What was implemented

TypeScript Definitions (pkg/workflow/js/types/safe-outputs.d.ts)

The new TypeScript definitions file provides type safety for:

JSONL Item Types: Complete interfaces for all safe output items with proper validation:

  • Union type SafeOutputItem covering all possible output types
  • Individual item interfaces like CreateIssueItem, CreatePullRequestItem, etc.
  • Proper type discrimination based on the type field
  • Base interface BaseSafeOutputItem for common properties

Validation

  • ✅ TypeScript compiler validation (zero errors)
  • ✅ All existing tests continue to pass
  • ✅ Linting and formatting applied
  • ✅ Cross-referenced with Go structs and JavaScript validation logic
  • ✅ Manual testing of CLI functionality

Impact

This provides type safety for developers working with the safe outputs JSONL system, ensuring consistency between TypeScript usage and the actual Go/JavaScript implementation. The definitions accurately reflect the real behavior rather than just the documentation.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Review all the safe output related JavaScript/Go code and prompting and generate a typescript definition file with an interface type for each safe output. Look for inconsistencies. Generate comprehensive TypeScript definitions for safe outputs system Sep 12, 2025
Copilot AI requested a review from pelikhan September 12, 2025 12:20
Comment thread pkg/workflow/js/types/safe-outputs.d.ts
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Sep 12, 2025

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • api.contoso.com
    • Triggering command: /tmp/go-build1250007359/b278/cli.test -test.testlogfile=/tmp/go-build1250007359/b278/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title Generate comprehensive TypeScript definitions for safe outputs system Generate TypeScript definitions for safe outputs JSONL types Sep 12, 2025
Copilot AI requested a review from pelikhan September 12, 2025 12:30
Comment thread SAFE_OUTPUT_INCONSISTENCIES.md Outdated
@@ -0,0 +1,101 @@
# Safe Output Types Analysis - Inconsistencies Found
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@copilot remove file

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.

Removed the SAFE_OUTPUT_INCONSISTENCIES.md file as requested. Commit: fa7d7c2

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Sep 12, 2025

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • api.contoso.com

If you need me to access, download, or install something from one of these locations, you can either:

@pelikhan pelikhan marked this pull request as ready for review September 12, 2025 12:44
@pelikhan pelikhan merged commit 47cbe12 into main Sep 12, 2025
@pelikhan pelikhan deleted the copilot/fix-8a81c7fc-b603-4874-93c1-dd2e8a8f383f branch September 12, 2025 12:44
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.

2 participants