proposal-create-hosted-body.mjs
20 lines 788 B
Raw
sha256:65ccb454656ea5acdea0a10e559b78bcde1eb6ff753ecc2911bc99d1c3d7cadd feat(calendar): enforce agent context tiers in retrieval AP… Human minor ⚠ breaking 1 day ago
1 /**
2 * Hosted: merge evaluation policy + review triggers into POST /api/v1/proposals JSON before canister.
3 */
4
5 import { augmentProposalCreateRequestBody } from '../../lib/hub-proposal-create-augment.mjs';
6
7 /**
8 * @param {string} method
9 * @param {string} pathOnly
10 * @param {unknown} body
11 * @param {string} dataDir
12 * @param {{ evaluationRequired?: boolean }} [policyOptions]
13 * @returns {unknown}
14 */
15 export function augmentProposalCreateForHosted(method, pathOnly, body, dataDir, policyOptions = {}) {
16 if (method !== 'POST') return body;
17 if (pathOnly !== '/api/v1/proposals' && pathOnly !== '/api/v1/proposals/') return body;
18 if (!body || typeof body !== 'object' || Buffer.isBuffer(body)) return body;
19 return augmentProposalCreateRequestBody(body, dataDir, policyOptions);
20 }
File History 2 commits
sha256:65ccb454656ea5acdea0a10e559b78bcde1eb6ff753ecc2911bc99d1c3d7cadd feat(calendar): enforce agent context tiers in retrieval AP… Human minor 1 day ago
sha256:9103f98c89257ed2b01c237cea895dabb3e85ea337dccb1161c175e4422355b6 docs: accept Calendar Events v0 spec with Phase 0 security … Human 1 day ago