@tpmjs/tools-sprites-policy-get
Retrieve the current network policy for a sprite including allowed domains and filtering rules. Use this to understand what network access a sprite has.
Test @tpmjs/tools-sprites-policy-get (spritesPolicyGetTool) with AI-powered execution
0/2000 characters
Install this tool and use it with the AI SDK
npm install @tpmjs/tools-sprites-policy-getpnpm add @tpmjs/tools-sprites-policy-getyarn add @tpmjs/tools-sprites-policy-getbun add @tpmjs/tools-sprites-policy-getdeno add npm:@tpmjs/tools-sprites-policy-getimport { spritesPolicyGetTool } from '@tpmjs/tools-sprites-policy-get';import { generateText } from 'ai';
import { openai } from '@ai-sdk/openai';
import { spritesPolicyGetTool } from '@tpmjs/tools-sprites-policy-get';
const result = await generateText({
model: openai('gpt-4o'),
tools: { spritesPolicyGetTool },
prompt: 'Your prompt here...',
});
console.log(result.text);Available configuration options
namestringName of the sprite to get policy for
Schema extracted: 1/16/2026, 3:45:30 AM
Retrieve the current network policy for a sprite including allowed domains.
npm install @tpmjs/sprites-policy-get
SPRITES_TOKEN environment variable - Get your token from https://sprites.devimport { spritesPolicyGetTool } from '@tpmjs/sprites-policy-get'; const result = await spritesPolicyGetTool.execute({ name: 'my-sandbox' }); console.log(result); // { // mode: 'allow', // domains: ['api.github.com', 'registry.npmjs.org'], // rules: [] // }
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Name of the sprite to get policy for |
| Field | Type | Description |
|---|---|---|
mode | 'allow' | 'deny' | Policy mode |
domains | string[] | List of domains affected by the policy |
rules | object[]? | Optional additional filtering rules |
allow mode: Blocks all outbound traffic EXCEPT to listed domainsdeny mode: Allows all outbound traffic EXCEPT to listed domainsThe tool throws errors in these cases:
SPRITES_TOKEN environment variable is not setMIT
Downloads/month
325
GitHub Stars
0
Quality Score