agentic-ads-engine 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/src/formats/index.js +2 -2
- package/src/hooks/index.js +2 -2
- package/src/qa/index.js +4 -3
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentic-ads-engine",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Offline ad templates, hook selection, policy lint, and planning tools",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"engines": { "node": ">=20" },
|
|
6
|
+
"engines": { "node": ">=20.10" },
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"repository": { "type": "git", "url": "git+https://github.com/itsryanarmani/agentic-ads-engine.git" },
|
|
9
9
|
"homepage": "https://github.com/itsryanarmani/agentic-ads-engine#readme",
|
package/src/formats/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { checklistFor, gateChecklistFor, costRatchet } from '../qa/index.js';
|
|
2
|
-
import
|
|
3
|
-
const library =
|
|
2
|
+
import libraryJson from './library.json' with { type: 'json' };
|
|
3
|
+
const library = libraryJson;
|
|
4
4
|
const costs = ['free', 'cheap', 'mid', 'expensive'], risks = ['low', 'medium', 'high'];
|
|
5
5
|
function argumentsFor(value, keys) {
|
|
6
6
|
if (!value || typeof value !== 'object' || Array.isArray(value) || Object.keys(value).some(k => !keys.includes(k))) throw new Error('Invalid format arguments');
|
package/src/hooks/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { getFormat } from '../formats/index.js';
|
|
2
|
-
import
|
|
2
|
+
import libraryJson from './library.json' with { type: 'json' };
|
|
3
3
|
import { mkdir, readFile, open, rename, unlink } from 'node:fs/promises';
|
|
4
4
|
import { join } from 'node:path';
|
|
5
5
|
import { randomUUID } from 'node:crypto';
|
|
6
|
-
export const hooks = Object.freeze(
|
|
6
|
+
export const hooks = Object.freeze(structuredClone(libraryJson)
|
|
7
7
|
.map(hook => Object.freeze({ ...hook, tags: Object.freeze(hook.tags), formats: Object.freeze(hook.formats) })));
|
|
8
8
|
export const emotions = Object.freeze(['shock', 'fear', 'curiosity', 'relief', 'humor', 'pride']);
|
|
9
9
|
/** Filters combine with AND; returned descriptors are independent copies. */
|
package/src/qa/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
const
|
|
1
|
+
import rulesJson from './rules.json' with { type: 'json' };
|
|
2
|
+
import gatesJson from './gates.json' with { type: 'json' };
|
|
3
|
+
const rules = rulesJson;
|
|
4
|
+
const gates = gatesJson;
|
|
4
5
|
export function gateChecklistFor(format) {
|
|
5
6
|
return format.qaGates.map(id => {
|
|
6
7
|
if (!Object.hasOwn(gates, id)) throw new Error('Unknown QA gate: ' + id);
|