{"_id":"@agnt-sdk/config","_rev":"2-3740650c6bf59424bc494714529668de","name":"@agnt-sdk/config","dist-tags":{"latest":"0.0.2"},"versions":{"0.0.1":{"name":"@agnt-sdk/config","version":"0.0.1","keywords":["agnt","config","typescript"],"author":{"name":"Agnt"},"license":"MIT","_id":"@agnt-sdk/config@0.0.1","maintainers":[{"name":"anindya007","email":"anindya@skej.com"}],"homepage":"https://github.com/agnt-ai/agnt-node/tree/main/packages/config#readme","bugs":{"url":"https://github.com/agnt-ai/agnt-node/issues"},"dist":{"shasum":"43ecb63d847f06ff084890454b8ff4d358f01914","tarball":"https://registry.npmjs.org/@agnt-sdk/config/-/config-0.0.1.tgz","fileCount":10,"integrity":"sha512-4iTOPt+npKBybzLFPOuU4BOKEpMVMG7JlPEAnizba3/e9LTEkNC5MFozcUWLkqhygk+NF6yyDSq2mwbaJC/7Zg==","signatures":[{"sig":"MEUCIBr7VGt3LdtZBToQ4Ok8Qcu2E3jz1xYASkxEg0jCKeEbAiEA01xgSmy+mOudVpp70uhWo3euWU1DEDim+J8YJ2eJl4E=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":20238},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"08e7599ad0c8f35e0897fdef91280187fffd67cc","scripts":{"test":"vitest run","build":"tsc","clean":"rm -rf dist","test:watch":"vitest","build:watch":"tsc --watch","test:coverage":"vitest run --coverage","prepublishOnly":"npm run build"},"_npmUser":{"name":"anindya007","email":"anindya@skej.com"},"repository":{"url":"git+https://github.com/agnt-ai/agnt-node.git","type":"git","directory":"packages/config"},"_npmVersion":"11.7.0","description":"Shared configuration loader for @agnt-sdk packages","directories":{},"_nodeVersion":"22.17.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.1.8","typescript":"^5.3.3","@types/node":"^20.0.0","@vitest/coverage-v8":"^2.1.8"},"_npmOperationalInternal":{"tmp":"tmp/config_0.0.1_1772752455041_0.05593914197383154","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"@agnt-sdk/config","version":"0.0.2","description":"Shared configuration loader for @agnt-sdk packages","type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"build":"tsc","build:watch":"tsc --watch","clean":"rm -rf dist","prepublishOnly":"npm run build","test":"vitest run","test:watch":"vitest","test:coverage":"vitest run --coverage"},"engines":{"node":">=18.0.0"},"author":{"name":"Agnt"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/agnt-ai/agnt-node.git","directory":"packages/config"},"homepage":"https://github.com/agnt-ai/agnt-node/tree/main/packages/config#readme","bugs":{"url":"https://github.com/agnt-ai/agnt-node/issues"},"keywords":["agnt","config","typescript"],"publishConfig":{"access":"public"},"devDependencies":{"@types/node":"^20.0.0","@vitest/coverage-v8":"^2.1.8","typescript":"^5.3.3","vitest":"^2.1.8"},"gitHead":"08e7599ad0c8f35e0897fdef91280187fffd67cc","_id":"@agnt-sdk/config@0.0.2","_nodeVersion":"22.17.0","_npmVersion":"11.7.0","dist":{"integrity":"sha512-oFCd65xQoWpUe6BMeqX30pBPebReNHzKdJNH6GsRI85sdRDJ+PNJJlMA2ks7ewwC8YNgssy92O6Yj54916rihQ==","shasum":"676996819b7fca18e483f41fa0ac23aa38ed632e","tarball":"https://registry.npmjs.org/@agnt-sdk/config/-/config-0.0.2.tgz","fileCount":6,"unpackedSize":9672,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFR6mKIH9ffK2J+2taBhWqb4kHbQmx5rp6At/2k1Ad61AiBpIwrghd4VYBusESSELgSYZkdMJQKNNh2BnggycxUYMg=="}]},"_npmUser":{"name":"anindya007","email":"anindya@skej.com"},"directories":{},"maintainers":[{"name":"anindya007","email":"anindya@skej.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/config_0.0.2_1772752499099_0.874858986517965"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-05T23:14:14.961Z","modified":"2026-03-05T23:14:59.391Z","0.0.1":"2026-03-05T23:14:15.221Z","0.0.2":"2026-03-05T23:14:59.248Z"},"bugs":{"url":"https://github.com/agnt-ai/agnt-node/issues"},"author":{"name":"Agnt"},"license":"MIT","homepage":"https://github.com/agnt-ai/agnt-node/tree/main/packages/config#readme","keywords":["agnt","config","typescript"],"repository":{"type":"git","url":"git+https://github.com/agnt-ai/agnt-node.git","directory":"packages/config"},"description":"Shared configuration loader for @agnt-sdk packages","maintainers":[{"name":"anindya007","email":"anindya@skej.com"}],"readme":"# @agnt-sdk/config\n\nShared configuration loader for the `@agnt-sdk` package family.\n\nAll SDK packages read from the same `agnt.config.js` (or `agnt.config.ts`) file. This package provides the type definitions and the file-discovery logic that walks up the directory tree from `process.cwd()` until it finds the config file — the same convention used by tools like ESLint and TypeScript.\n\n## Installation\n\n```bash\nnpm install @agnt-sdk/config\n```\n\nYou normally don't need to install this directly — it is a peer dependency of `@agnt-sdk/client` and `@agnt-sdk/studio`.\n\n## Config file\n\nCreate `agnt.config.js` at the root of your project:\n\n```js\n// agnt.config.js\nexport default {\n  // Required by @agnt-sdk/client\n  privateKey: `-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBgkqhk...\n-----END PRIVATE KEY-----`,\n  kid: 'your-key-id',          // Key ID from the Agnt dashboard → Certificates\n\n  // Required by all packages\n  apiUrl: 'https://api.agnt.ai',\n\n  // Required by @agnt-sdk/studio\n  serviceKey: '',               // Optional: for private/unlisted prompts\n  outputDir: './agnt/prompts',  // Where pulled manifests are saved\n  apiMode: false,               // true = always fetch from API; false = use local files\n};\n```\n\n## Usage\n\n```ts\nimport { loadConfig } from '@agnt-sdk/config';\nimport type { AgntConfig } from '@agnt-sdk/config';\n\nconst config: AgntConfig = await loadConfig();\n```\n\n### Override the search path\n\n```ts\nconst config = await loadConfig('/path/to/project');\n```\n\n### Pass config directly (no file needed)\n\nAll SDK packages accept an optional `config` parameter that bypasses file discovery — useful in serverless environments where a config file isn't available:\n\n```ts\nconst client = await AgntClient.create({\n  config: {\n    privateKey: process.env.AGNT_PRIVATE_KEY,\n    kid: process.env.AGNT_KID,\n    apiUrl: 'https://api.agnt.ai',\n  }\n});\n```\n\n## `AgntConfig` type reference\n\n```ts\ninterface AgntConfig {\n  /** RSA private key PEM — used by @agnt-sdk/client for RS256 JWT signing */\n  privateKey?: string;\n\n  /** Key ID registered on the Agnt platform — included in JWT header */\n  kid?: string;\n\n  /** Agnt API base URL, e.g. 'https://api.agnt.ai' */\n  apiUrl: string;\n\n  /** Service key for accessing private/unlisted prompts (@agnt-sdk/studio) */\n  serviceKey: string;\n\n  /** Directory where pulled manifest files are saved (@agnt-sdk/studio) */\n  outputDir: string;\n\n  /** true = fetch manifests from API on every execution (@agnt-sdk/studio) */\n  apiMode: boolean;\n\n  /** Max messages in agent loop before throwing — prevents infinite loops */\n  maxMessages?: number;\n}\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}