Skip to content

Conversation

@ryoppippi
Copy link
Member

@ryoppippi ryoppippi commented Dec 9, 2025

Summary

Remove the centralised constants.ts file containing hardcoded account IDs and replace with inline placeholder values in each example file.

This change addresses feedback from PR #148 review by @glebedel:

  • Account IDs should not be stored in shared constants
  • Examples are clearer with inline values that users replace directly
  • Avoids exposing internal implementation details

Changes

  • Delete examples/constants.ts with hardcoded account IDs
  • Update all example files to use inline placeholder accountId variables
  • Each example now has a clear comment: "Replace with your actual account ID"
  • Update README.md to reflect new pattern and remove constants.ts references

Test plan

  • TypeScript typecheck passes
  • All unit tests pass (284 tests)
  • Knip finds no unused exports

Closes #196


Summary by cubic

Replaced the shared ACCOUNT_IDS constant with inline accountId placeholders in each example to simplify setup and avoid shipping hardcoded IDs.

  • Refactors

    • Removed examples/constants.ts.
    • Inlined accountId (and atsAccountId/hrisAccountId where needed) in each example and passed them to StackOneToolSet/accountIds.
    • Updated examples/README.md to document the new pattern and remove constants.ts references.
    • No runtime behavior change.
  • Migration

    • Remove ACCOUNT_IDS imports and define a local const accountId = 'your-...-account-id' in each example.
    • For multi-integration examples (e.g., planning), define atsAccountId/hrisAccountId and pass them to accountIds.
    • Delete any copied constants.ts from your local examples.

Written for commit 753a137. Summary will update automatically on new commits.

…ders

Remove the centralised constants.ts file containing hardcoded account IDs
and replace with inline placeholder values in each example file.

This change addresses feedback from PR #148 review by @glebedel:
- Account IDs should not be stored in shared constants
- Examples are clearer with inline values that users replace directly
- Avoids exposing internal implementation details

Changes:
- Delete examples/constants.ts with hardcoded account IDs
- Update all example files to use inline placeholder accountId variables
- Each example now has a clear comment: "Replace with your actual account ID"
- Update README.md to reflect new pattern and remove constants.ts references

Closes #196
@ryoppippi ryoppippi requested a review from a team as a code owner December 9, 2025 17:51
Copilot AI review requested due to automatic review settings December 9, 2025 17:51
@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 9, 2025

Open in StackBlitz

npm i https://pkg.pr.new/StackOneHQ/stackone-ai-node/@stackone/ai@198

commit: 753a137

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 8 files

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors the examples to remove a centralized constants file containing hardcoded account IDs in favor of inline placeholder values. This improves clarity by having users replace account IDs directly in each example file they use, rather than maintaining a separate constants file.

Key changes:

  • Removed the centralized examples/constants.ts file with hardcoded account IDs
  • Added inline placeholder account ID variables with clear replacement instructions in each example
  • Updated documentation to reflect the new inline pattern

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
examples/constants.ts Deleted centralized constants file containing hardcoded account IDs
examples/planning.ts Replaced ACCOUNT_IDS imports with inline atsAccountId and hrisAccountId placeholders
examples/openai-integration.ts Replaced ACCOUNT_IDS.HRIS with inline accountId placeholder
examples/meta-tools.ts Replaced ACCOUNT_IDS.HRIS with inline accountId placeholder
examples/index.ts Replaced ACCOUNT_IDS.HRIS with inline accountId placeholder
examples/human-in-the-loop.ts Replaced ACCOUNT_IDS.HRIS with inline accountId placeholder
examples/ai-sdk-integration.ts Replaced ACCOUNT_IDS.HRIS with inline accountId placeholder
examples/README.md Updated documentation to explain inline placeholder pattern and removed constants.ts references

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@glebedel glebedel left a comment

Choose a reason for hiding this comment

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

LGTM

@ryoppippi ryoppippi merged commit b6af300 into main Dec 9, 2025
19 checks passed
@ryoppippi ryoppippi deleted the refactor/remove-account-ids-constants branch December 9, 2025 19:00
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.

Refactor: Remove account_ids from constants, use inline values in examples

3 participants