terse-cli 0.3.5 → 0.3.7

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.
Files changed (23) hide show
  1. package/dist/eventFixture.js +1 -0
  2. package/dist/eventFixture.js.map +1 -1
  3. package/dist/providers/typescript/modules/google_search_console/GoogleSearchConsoleModule.d.ts +27 -0
  4. package/dist/providers/typescript/modules/google_search_console/GoogleSearchConsoleModule.d.ts.map +1 -0
  5. package/dist/providers/typescript/modules/google_search_console/GoogleSearchConsoleModule.js +54 -0
  6. package/dist/providers/typescript/modules/google_search_console/GoogleSearchConsoleModule.js.map +1 -0
  7. package/dist/providers/typescript/modules/higgsfield/HiggsfieldModule.d.ts +20 -0
  8. package/dist/providers/typescript/modules/higgsfield/HiggsfieldModule.d.ts.map +1 -0
  9. package/dist/providers/typescript/modules/higgsfield/HiggsfieldModule.js +27 -0
  10. package/dist/providers/typescript/modules/higgsfield/HiggsfieldModule.js.map +1 -0
  11. package/dist/providers/typescript/modules/meta_ads/MetaAdsModule.d.ts +24 -0
  12. package/dist/providers/typescript/modules/meta_ads/MetaAdsModule.d.ts.map +1 -0
  13. package/dist/providers/typescript/modules/meta_ads/MetaAdsModule.js +34 -0
  14. package/dist/providers/typescript/modules/meta_ads/MetaAdsModule.js.map +1 -0
  15. package/dist/providers/typescript/modules/registry.d.ts.map +1 -1
  16. package/dist/providers/typescript/modules/registry.js +7 -1
  17. package/dist/providers/typescript/modules/registry.js.map +1 -1
  18. package/package.json +3 -3
  19. package/src/providers/typescript/modules/github/github.triggers.hbs +9 -1
  20. package/src/providers/typescript/modules/google_search_console/google_search_console.tools.hbs +16 -0
  21. package/src/providers/typescript/modules/higgsfield/higgsfield.tools.hbs +12 -0
  22. package/src/providers/typescript/modules/meta_ads/meta_ads.tools.hbs +16 -0
  23. package/templates/typescript/codegen/sdk-primitives.hbs +6 -0
@@ -31,6 +31,7 @@ const EXPECTED_FIXTURE_HINT = [
31
31
  ' "body": { "your": "payload" }',
32
32
  "}",
33
33
  'Optional top-level "formattedContent" / "debugLog" strings override the derived prompt and log text.',
34
+ 'An optional top-level "triggeredAt" ISO 8601 timestamp pins event.triggeredAt so date windows are reproducible.',
34
35
  "Tip: `terse test show <id> --json` emits ready-to-use fixtures."
35
36
  ].join("\n");
36
37
  //# sourceMappingURL=eventFixture.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"eventFixture.js","sourceRoot":"","sources":["../src/eventFixture.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAA;AAExE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAExC,MAAM,UAAU,qBAAqB,CAAC,GAAW,EAAE,WAAmB;IAClE,MAAM,MAAM,GAAG,SAAS,CAAC,GAAG,EAAE,WAAW,CAAC,CAAA;IAC1C,MAAM,MAAM,GAAG,kBAAkB,CAAC,SAAS,CAAC,MAAM,CAAC,CAAA;IACnD,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;QACjB,OAAO,sBAAsB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;IAC9C,CAAC;IACD,MAAM,IAAI,QAAQ,CAAC,qBAAqB,EAAE,GAAG,WAAW,+CAA+C,EAAE;QACrG,MAAM,EAAE,GAAG,CAAC,CAAC,aAAa,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,qBAAqB,EAAE;KACzE,CAAC,CAAA;AACN,CAAC;AAED,SAAS,SAAS,CAAC,GAAW,EAAE,WAAmB;IAC/C,IAAI,CAAC;QACD,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IAC1B,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACX,MAAM,IAAI,QAAQ,CAAC,oBAAoB,EAAE,GAAG,WAAW,sBAAsB,EAAE;YAC3E,MAAM,EAAE,GAAG,YAAY,KAAK,CAAC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CAAC,oBAAoB,EAAE,GAAG,WAAW,sBAAsB,EAAE;YAC3E,MAAM,EAAE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC;SAC3D,CAAC,CAAA;IACN,CAAC;AACL,CAAC;AAED,MAAM,qBAAqB,GAAG;IAC1B,sDAAsD;IACtD,GAAG;IACH,iCAAiC;IACjC,2BAA2B;IAC3B,qBAAqB;IACrB,sDAAsD;IACtD,iCAAiC;IACjC,GAAG;IACH,sGAAsG;IACtG,iHAAiH;IACjH,iEAAiE;CACpE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA"}
@@ -0,0 +1,27 @@
1
+ import { IntegrationType } from "terse-types";
2
+ import { IntegrationModule, type ModuleRenderInput } from "../IntegrationModule.js";
3
+ import { type ResourceClassContext } from "../moduleHelpers.js";
4
+ export declare class GoogleSearchConsoleModule extends IntegrationModule<GoogleSearchConsoleInstanceData, GoogleSearchConsoleSectionContext> {
5
+ readonly type = IntegrationType.GOOGLE_SEARCH_CONSOLE;
6
+ readonly summaryLabel = "Google Search Console";
7
+ protected readonly sectionImports: string[];
8
+ fetchInstances(apiKey: string): Promise<GoogleSearchConsoleInstanceData[]>;
9
+ instanceId(instance: GoogleSearchConsoleInstanceData): string;
10
+ protected get skillsAggregateLines(): readonly string[];
11
+ protected prepareSection(input: ModuleRenderInput<GoogleSearchConsoleInstanceData>): GoogleSearchConsoleSectionContext;
12
+ }
13
+ export interface GoogleSearchConsoleInstanceData {
14
+ id: string;
15
+ displayName: string;
16
+ sites: Array<{
17
+ siteUrl: string;
18
+ permissionLevel: string;
19
+ label: string;
20
+ }>;
21
+ }
22
+ export interface GoogleSearchConsoleSectionContext {
23
+ id: string;
24
+ skillToolType: string;
25
+ siteClass: ResourceClassContext;
26
+ }
27
+ //# sourceMappingURL=GoogleSearchConsoleModule.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GoogleSearchConsoleModule.d.ts","sourceRoot":"","sources":["../../../../../src/providers/typescript/modules/google_search_console/GoogleSearchConsoleModule.ts"],"names":[],"mappings":"AACA,OAAO,EAAa,eAAe,EAAE,MAAM,aAAa,CAAA;AAGxD,OAAO,EAAE,iBAAiB,EAAE,KAAK,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AACnF,OAAO,EAAE,KAAK,oBAAoB,EAAiD,MAAM,qBAAqB,CAAA;AAI9G,qBAAa,yBAA0B,SAAQ,iBAAiB,CAAC,+BAA+B,EAAE,iCAAiC,CAAC;IAChI,QAAQ,CAAC,IAAI,yCAAwC;IACrD,QAAQ,CAAC,YAAY,2BAA0B;IAC/C,SAAS,CAAC,QAAQ,CAAC,cAAc,WAAoD;IAE/E,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,+BAA+B,EAAE,CAAC;IAgBhF,UAAU,CAAC,QAAQ,EAAE,+BAA+B,GAAG,MAAM;IAI7D,SAAS,KAAK,oBAAoB,IAAI,SAAS,MAAM,EAAE,CAEtD;IAED,SAAS,CAAC,cAAc,CAAC,KAAK,EAAE,iBAAiB,CAAC,+BAA+B,CAAC,GAAG,iCAAiC;CAgBzH;AAeD,MAAM,WAAW,+BAA+B;IAC5C,EAAE,EAAE,MAAM,CAAA;IACV,WAAW,EAAE,MAAM,CAAA;IACnB,KAAK,EAAE,KAAK,CAAC;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,eAAe,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAC5E;AAED,MAAM,WAAW,iCAAiC;IAC9C,EAAE,EAAE,MAAM,CAAA;IACV,aAAa,EAAE,MAAM,CAAA;IACrB,SAAS,EAAE,oBAAoB,CAAA;CAClC"}
@@ -0,0 +1,54 @@
1
+ import { ApiRoutes, IntegrationType } from "terse-types";
2
+ import { fetchWithAuth } from "../../../../api.js";
3
+ import { IntegrationModule } from "../IntegrationModule.js";
4
+ import { buildResourceClassContext, buildSkillToolType } from "../moduleHelpers.js";
5
+ const DOMAIN_PROPERTY_PREFIX = "sc-domain:";
6
+ export class GoogleSearchConsoleModule extends IntegrationModule {
7
+ type = IntegrationType.GOOGLE_SEARCH_CONSOLE;
8
+ summaryLabel = "Google Search Console";
9
+ sectionImports = ["GoogleSearchConsoleOutputConfig", "TypedSkill"];
10
+ async fetchInstances(apiKey) {
11
+ const instances = await fetchWithAuth(ApiRoutes.GOOGLE_SEARCH_CONSOLE.INTEGRATIONS, apiKey);
12
+ return Promise.all(instances.map(async (inst) => {
13
+ const response = await fetchWithAuth(`${ApiRoutes.GOOGLE_SEARCH_CONSOLE.SITES}?integrationId=${encodeURIComponent(inst.id)}`, apiKey).catch(() => ({
14
+ sites: []
15
+ }));
16
+ return {
17
+ id: inst.id,
18
+ displayName: inst.email || inst.id,
19
+ sites: (response.sites ?? []).map(site => ({ ...site, label: toSiteLabel(site.siteUrl) }))
20
+ };
21
+ }));
22
+ }
23
+ instanceId(instance) {
24
+ return instance.id;
25
+ }
26
+ get skillsAggregateLines() {
27
+ return [" /** Google Search Console — read Search Analytics and manage the given properties */", " googleSearchConsole: googleSearchConsoleSkill,"];
28
+ }
29
+ prepareSection(input) {
30
+ const inst = this.requireInstance(input);
31
+ return {
32
+ id: inst.id,
33
+ skillToolType: buildSkillToolType(input.tools),
34
+ siteClass: buildResourceClassContext("GoogleSearchConsoleSite", [
35
+ { classField: "siteUrl", type: "string", sourceField: "siteUrl" },
36
+ { classField: "permissionLevel", type: "string", sourceField: "permissionLevel" }
37
+ ], "label", inst.sites)
38
+ };
39
+ }
40
+ }
41
+ /** Properties have no title in Search Console, so name the generated statics after the host. */
42
+ function toSiteLabel(siteUrl) {
43
+ if (siteUrl.toLowerCase().startsWith(DOMAIN_PROPERTY_PREFIX)) {
44
+ return `domain ${siteUrl.slice(DOMAIN_PROPERTY_PREFIX.length)}`;
45
+ }
46
+ try {
47
+ const parsed = new URL(siteUrl);
48
+ return `${parsed.hostname}${parsed.pathname.replace(/\/$/, "")}`;
49
+ }
50
+ catch {
51
+ return siteUrl;
52
+ }
53
+ }
54
+ //# sourceMappingURL=GoogleSearchConsoleModule.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GoogleSearchConsoleModule.js","sourceRoot":"","sources":["../../../../../src/providers/typescript/modules/google_search_console/GoogleSearchConsoleModule.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAExD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAClD,OAAO,EAAE,iBAAiB,EAA0B,MAAM,yBAAyB,CAAA;AACnF,OAAO,EAA6B,yBAAyB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAA;AAE9G,MAAM,sBAAsB,GAAG,YAAY,CAAA;AAE3C,MAAM,OAAO,yBAA0B,SAAQ,iBAAqF;IACvH,IAAI,GAAG,eAAe,CAAC,qBAAqB,CAAA;IAC5C,YAAY,GAAG,uBAAuB,CAAA;IAC5B,cAAc,GAAG,CAAC,iCAAiC,EAAE,YAAY,CAAC,CAAA;IAErF,KAAK,CAAC,cAAc,CAAC,MAAc;QAC/B,MAAM,SAAS,GAAG,MAAM,aAAa,CAAmC,SAAS,CAAC,qBAAqB,CAAC,YAAY,EAAE,MAAM,CAAC,CAAA;QAC7H,OAAO,OAAO,CAAC,GAAG,CACd,SAAS,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,EAA4C,EAAE;YACnE,MAAM,QAAQ,GAAG,MAAM,aAAa,CAAmC,GAAG,SAAS,CAAC,qBAAqB,CAAC,KAAK,kBAAkB,kBAAkB,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC;gBACjL,KAAK,EAAE,EAAE;aACZ,CAAC,CAAC,CAAA;YACH,OAAO;gBACH,EAAE,EAAE,IAAI,CAAC,EAAE;gBACX,WAAW,EAAE,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C,CAAA;QAC/B,OAAO,GAAG,MAAM,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,EAAE,CAAA;IACpE,CAAC;IAAC,MAAM,CAAC;QACL,OAAO,OAAO,CAAA;IAClB,CAAC;AACL,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { IntegrationType } from "terse-types";
2
+ import { IntegrationModule, type ModuleRenderInput } from "../IntegrationModule.js";
3
+ export declare class HiggsfieldModule extends IntegrationModule<HiggsfieldInstanceData, HiggsfieldSectionContext> {
4
+ readonly type = IntegrationType.HIGGSFIELD;
5
+ readonly summaryLabel = "Higgsfield";
6
+ protected readonly sectionImports: string[];
7
+ fetchInstances(apiKey: string): Promise<HiggsfieldInstanceData[]>;
8
+ instanceId(instance: HiggsfieldInstanceData): string;
9
+ protected get skillsAggregateLines(): readonly string[];
10
+ protected prepareSection(input: ModuleRenderInput<HiggsfieldInstanceData>): HiggsfieldSectionContext;
11
+ }
12
+ export interface HiggsfieldInstanceData {
13
+ id: string;
14
+ displayName: string;
15
+ }
16
+ export interface HiggsfieldSectionContext {
17
+ id: string;
18
+ skillToolType: string;
19
+ }
20
+ //# sourceMappingURL=HiggsfieldModule.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HiggsfieldModule.d.ts","sourceRoot":"","sources":["../../../../../src/providers/typescript/modules/higgsfield/HiggsfieldModule.ts"],"names":[],"mappings":"AACA,OAAO,EAAa,eAAe,EAAE,MAAM,aAAa,CAAA;AAGxD,OAAO,EAAE,iBAAiB,EAAE,KAAK,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAGnF,qBAAa,gBAAiB,SAAQ,iBAAiB,CAAC,sBAAsB,EAAE,wBAAwB,CAAC;IACrG,QAAQ,CAAC,IAAI,8BAA6B;IAC1C,QAAQ,CAAC,YAAY,gBAAe;IACpC,SAAS,CAAC,QAAQ,CAAC,cAAc,WAA2C;IAEtE,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,sBAAsB,EAAE,CAAC;IAKvE,UAAU,CAAC,QAAQ,EAAE,sBAAsB,GAAG,MAAM;IAIpD,SAAS,KAAK,oBAAoB,IAAI,SAAS,MAAM,EAAE,CAEtD;IAED,SAAS,CAAC,cAAc,CAAC,KAAK,EAAE,iBAAiB,CAAC,sBAAsB,CAAC,GAAG,wBAAwB;CAOvG;AAED,MAAM,WAAW,sBAAsB;IACnC,EAAE,EAAE,MAAM,CAAA;IACV,WAAW,EAAE,MAAM,CAAA;CACtB;AAED,MAAM,WAAW,wBAAwB;IACrC,EAAE,EAAE,MAAM,CAAA;IACV,aAAa,EAAE,MAAM,CAAA;CACxB"}
@@ -0,0 +1,27 @@
1
+ import { ApiRoutes, IntegrationType } from "terse-types";
2
+ import { fetchWithAuth } from "../../../../api.js";
3
+ import { IntegrationModule } from "../IntegrationModule.js";
4
+ import { buildSkillToolType } from "../moduleHelpers.js";
5
+ export class HiggsfieldModule extends IntegrationModule {
6
+ type = IntegrationType.HIGGSFIELD;
7
+ summaryLabel = "Higgsfield";
8
+ sectionImports = ["HiggsfieldOutputConfig", "TypedSkill"];
9
+ async fetchInstances(apiKey) {
10
+ const instances = await fetchWithAuth(ApiRoutes.HIGGSFIELD.INTEGRATIONS, apiKey);
11
+ return instances.map(inst => ({ id: inst.id, displayName: "Higgsfield" }));
12
+ }
13
+ instanceId(instance) {
14
+ return instance.id;
15
+ }
16
+ get skillsAggregateLines() {
17
+ return [" /** Higgsfield — generate ad creative images and animate them into video */", " higgsfield: higgsfieldSkill,"];
18
+ }
19
+ prepareSection(input) {
20
+ const inst = this.requireInstance(input);
21
+ return {
22
+ id: inst.id,
23
+ skillToolType: buildSkillToolType(input.tools)
24
+ };
25
+ }
26
+ }
27
+ //# sourceMappingURL=HiggsfieldModule.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HiggsfieldModule.js","sourceRoot":"","sources":["../../../../../src/providers/typescript/modules/higgsfield/HiggsfieldModule.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAExD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAClD,OAAO,EAAE,iBAAiB,EAA0B,MAAM,yBAAyB,CAAA;AACnF,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAA;AAExD,MAAM,OAAO,gBAAiB,SAAQ,iBAAmE;IAC5F,IAAI,GAAG,eAAe,CAAC,UAAU,CAAA;IACjC,YAAY,GAAG,YAAY,CAAA;IACjB,cAAc,GAAG,CAAC,wBAAwB,EAAE,YAAY,CAAC,CAAA;IAE5E,KAAK,CAAC,cAAc,CAAC,MAAc;QAC/B,MAAM,SAAS,GAAG,MAAM,aAAa,CAA0B,SAAS,CAAC,UAAU,CAAC,YAAY,EAAE,MAAM,CAAC,CAAA;QACzG,OAAO,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,WAAW,EAAE,YAAY,EAAE,CAAC,CAAC,CAAA;IAC9E,CAAC;IAED,UAAU,CAAC,QAAgC;QACvC,OAAO,QAAQ,CAAC,EAAE,CAAA;IACtB,CAAC;IAED,IAAc,oBAAoB;QAC9B,OAAO,CAAC,iFAAiF,EAAE,kCAAkC,CAAC,CAAA;IAClI,CAAC;IAES,cAAc,CAAC,KAAgD;QACrE,MAAM,IAAI,GAAG,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,CAAA;QACxC,OAAO;YACH,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,aAAa,EAAE,kBAAkB,CAAC,KAAK,CAAC,KAAK,CAAC;SACjD,CAAA;IACL,CAAC;CACJ"}
@@ -0,0 +1,24 @@
1
+ import type { MetaAdsAdAccount } from "terse-types";
2
+ import { IntegrationType } from "terse-types";
3
+ import { IntegrationModule, type ModuleRenderInput } from "../IntegrationModule.js";
4
+ import { type ResourceClassContext } from "../moduleHelpers.js";
5
+ export declare class MetaAdsModule extends IntegrationModule<MetaAdsInstanceData, MetaAdsSectionContext> {
6
+ readonly type = IntegrationType.META_ADS;
7
+ readonly summaryLabel = "Meta Ads";
8
+ protected readonly sectionImports: string[];
9
+ fetchInstances(apiKey: string): Promise<MetaAdsInstanceData[]>;
10
+ instanceId(instance: MetaAdsInstanceData): string;
11
+ protected get skillsAggregateLines(): readonly string[];
12
+ protected prepareSection(input: ModuleRenderInput<MetaAdsInstanceData>): MetaAdsSectionContext;
13
+ }
14
+ export interface MetaAdsInstanceData {
15
+ id: string;
16
+ displayName: string;
17
+ adAccounts: MetaAdsAdAccount[];
18
+ }
19
+ export interface MetaAdsSectionContext {
20
+ id: string;
21
+ skillToolType: string;
22
+ adAccountClass: ResourceClassContext;
23
+ }
24
+ //# sourceMappingURL=MetaAdsModule.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MetaAdsModule.d.ts","sourceRoot":"","sources":["../../../../../src/providers/typescript/modules/meta_ads/MetaAdsModule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAsB,MAAM,aAAa,CAAA;AACvE,OAAO,EAAa,eAAe,EAAc,MAAM,aAAa,CAAA;AAGpE,OAAO,EAAE,iBAAiB,EAAE,KAAK,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AACnF,OAAO,EAAE,KAAK,oBAAoB,EAAiD,MAAM,qBAAqB,CAAA;AAE9G,qBAAa,aAAc,SAAQ,iBAAiB,CAAC,mBAAmB,EAAE,qBAAqB,CAAC;IAC5F,QAAQ,CAAC,IAAI,4BAA2B;IACxC,QAAQ,CAAC,YAAY,cAAa;IAClC,SAAS,CAAC,QAAQ,CAAC,cAAc,WAAwC;IAEnE,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,EAAE,CAAC;IAUpE,UAAU,CAAC,QAAQ,EAAE,mBAAmB,GAAG,MAAM;IAIjD,SAAS,KAAK,oBAAoB,IAAI,SAAS,MAAM,EAAE,CAEtD;IAED,SAAS,CAAC,cAAc,CAAC,KAAK,EAAE,iBAAiB,CAAC,mBAAmB,CAAC,GAAG,qBAAqB;CAgBjG;AAED,MAAM,WAAW,mBAAmB;IAChC,EAAE,EAAE,MAAM,CAAA;IACV,WAAW,EAAE,MAAM,CAAA;IACnB,UAAU,EAAE,gBAAgB,EAAE,CAAA;CACjC;AAED,MAAM,WAAW,qBAAqB;IAClC,EAAE,EAAE,MAAM,CAAA;IACV,aAAa,EAAE,MAAM,CAAA;IACrB,cAAc,EAAE,oBAAoB,CAAA;CACvC"}
@@ -0,0 +1,34 @@
1
+ import { ApiRoutes, IntegrationType, buildRoute } from "terse-types";
2
+ import { fetchWithAuth } from "../../../../api.js";
3
+ import { IntegrationModule } from "../IntegrationModule.js";
4
+ import { buildResourceClassContext, buildSkillToolType } from "../moduleHelpers.js";
5
+ export class MetaAdsModule extends IntegrationModule {
6
+ type = IntegrationType.META_ADS;
7
+ summaryLabel = "Meta Ads";
8
+ sectionImports = ["MetaAdsOutputConfig", "TypedSkill"];
9
+ async fetchInstances(apiKey) {
10
+ const instances = await fetchWithAuth(ApiRoutes.META_ADS.INTEGRATIONS, apiKey);
11
+ return Promise.all(instances.map(async (inst) => {
12
+ const adAccounts = await fetchWithAuth(buildRoute(ApiRoutes.META_ADS.AD_ACCOUNTS, { integrationId: inst.id }), apiKey).catch(() => []);
13
+ return { id: inst.id, displayName: inst.accountName || inst.id, adAccounts };
14
+ }));
15
+ }
16
+ instanceId(instance) {
17
+ return instance.id;
18
+ }
19
+ get skillsAggregateLines() {
20
+ return [" /** Meta Ads — read campaign performance, sync custom audiences, send offline conversions */", " metaAds: metaAdsSkill,"];
21
+ }
22
+ prepareSection(input) {
23
+ const inst = this.requireInstance(input);
24
+ return {
25
+ id: inst.id,
26
+ skillToolType: buildSkillToolType(input.tools),
27
+ adAccountClass: buildResourceClassContext("MetaAdsAdAccount", [
28
+ { classField: "accountId", type: "string", sourceField: "accountId" },
29
+ { classField: "name", type: "string", sourceField: "name" }
30
+ ], "name", inst.adAccounts)
31
+ };
32
+ }
33
+ }
34
+ //# sourceMappingURL=MetaAdsModule.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MetaAdsModule.js","sourceRoot":"","sources":["../../../../../src/providers/typescript/modules/meta_ads/MetaAdsModule.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAEpE,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAClD,OAAO,EAAE,iBAAiB,EAA0B,MAAM,yBAAyB,CAAA;AACnF,OAAO,EAA6B,yBAAyB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAA;AAE9G,MAAM,OAAO,aAAc,SAAQ,iBAA6D;IACnF,IAAI,GAAG,eAAe,CAAC,QAAQ,CAAA;IAC/B,YAAY,GAAG,UAAU,CAAA;IACf,cAAc,GAAG,CAAC,qBAAqB,EAAE,YAAY,CAAC,CAAA;IAEzE,KAAK,CAAC,cAAc,CAAC,MAAc;QAC/B,MAAM,SAAS,GAAG,MAAM,aAAa,CAAuB,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC,CAAA;QACpG,OAAO,OAAO,CAAC,GAAG,CACd,SAAS,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,EAAgC,EAAE;YACvD,MAAM,UAAU,GAAG,MAAM,aAAa,CAAqB,UAAU,CAAC,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE,EAAE,aAAa,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,EAAwB,CAAC,CAAA;YAChL,OAAO,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,WAAW,EAAE,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,EAAE,EAAE,UAAU,EAAE,CAAA;QAChF,CAAC,CAAC,CACL,CAAA;IACL,CAAC;IAED,UAAU,CAAC,QAA6B;QACpC,OAAO,QAAQ,CAAC,EAAE,CAAA;IACtB,CAAC;IAED,IAAc,oBAAoB;QAC9B,OAAO,CAAC,kGAAkG,EAAE,4BAA4B,CAAC,CAAA;IAC7I,CAAC;IAES,cAAc,CAAC,KAA6C;QAClE,MAAM,IAAI,GAAG,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,CAAA;QACxC,OAAO;YACH,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,aAAa,EAAE,kBAAkB,CAAC,KAAK,CAAC,KAAK,CAAC;YAC9C,cAAc,EAAE,yBAAyB,CACrC,kBAAkB,EAClB;gBACI,EAAE,UAAU,EAAE,WAAW,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAE;gBACrE,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,EAAE;aAC9D,EACD,MAAM,EACN,IAAI,CAAC,UAAU,CAClB;SACJ,CAAA;IACL,CAAC;CACJ"}
@@ -1 +1 @@
1
- {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../../src/providers/typescript/modules/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAA;AAG1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAc/D,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AAGpD;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAAC,uBAAuB,EAAE,iBAAiB,CAexF,CAAA;AAED,eAAO,MAAM,WAAW,aAAoB,CAAA"}
1
+ {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../../src/providers/typescript/modules/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAA;AAG1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAiB/D,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AAGpD;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAAC,uBAAuB,EAAE,iBAAiB,CAkBxF,CAAA;AAED,eAAO,MAAM,WAAW,aAAoB,CAAA"}
@@ -4,9 +4,12 @@ import { AttioModule } from "./attio/AttioModule.js";
4
4
  import { DatadogModule } from "./datadog/DatadogModule.js";
5
5
  import { GithubModule } from "./github/GithubModule.js";
6
6
  import { GmailModule } from "./gmail/GmailModule.js";
7
+ import { GoogleSearchConsoleModule } from "./google_search_console/GoogleSearchConsoleModule.js";
7
8
  import { HeyReachModule } from "./hey_reach/HeyReachModule.js";
9
+ import { HiggsfieldModule } from "./higgsfield/HiggsfieldModule.js";
8
10
  import { LaunchDarklyModule } from "./launchdarkly/LaunchDarklyModule.js";
9
11
  import { LinearModule } from "./linear/LinearModule.js";
12
+ import { MetaAdsModule } from "./meta_ads/MetaAdsModule.js";
10
13
  import { NotionModule } from "./notion/NotionModule.js";
11
14
  import { PosthogModule } from "./posthog/PosthogModule.js";
12
15
  import { ResendModule } from "./resend/ResendModule.js";
@@ -33,7 +36,10 @@ export const integrationModuleRegistry = {
33
36
  [IntegrationType.WORKOS]: new WorkOSModule(),
34
37
  [IntegrationType.ATTIO]: new AttioModule(),
35
38
  [IntegrationType.SNOWFLAKE]: new SnowflakeModule(),
36
- [IntegrationType.APOLLO]: new ApolloModule()
39
+ [IntegrationType.APOLLO]: new ApolloModule(),
40
+ [IntegrationType.GOOGLE_SEARCH_CONSOLE]: new GoogleSearchConsoleModule(),
41
+ [IntegrationType.META_ADS]: new MetaAdsModule(),
42
+ [IntegrationType.HIGGSFIELD]: new HiggsfieldModule()
37
43
  };
38
44
  export const terseModule = new TerseModule();
39
45
  //# sourceMappingURL=registry.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"regist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AE;IAC1C,CAAC,eAAe,CAAC,SAAS,CAAC,EAAE,IAAI,eAAe,EAAE;IAClD,CAAC,eAAe,CAAC,MAAM,CAAC,EAAE,IAAI,YAAY,EAAE;IAC5C,CAAC,eAAe,CAAC,qBAAqB,CAAC,EAAE,IAAI,yBAAyB,EAAE;IACxE,CAAC,eAAe,CAAC,QAAQ,CAAC,EAAE,IAAI,aAAa,EAAE;IAC/C,CAAC,eAAe,CAAC,UAAU,CAAC,EAAE,IAAI,gBAAgB,EAAE;CACvD,CAAA;AAED,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,WAAW,EAAE,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "terse-cli",
3
- "version": "0.3.5",
3
+ "version": "0.3.7",
4
4
  "type": "module",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "repository": {
@@ -40,8 +40,8 @@
40
40
  "typescript": "^5.0.0",
41
41
  "workflow": "5.0.0-beta.19",
42
42
  "zod": "^4.3.6",
43
- "terse-types": "0.1.5",
44
- "terse-sdk": "0.3.5"
43
+ "terse-sdk": "0.3.7",
44
+ "terse-types": "0.1.7"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@types/luxon": "^3.7.1",
@@ -34,9 +34,17 @@ export const githubTriggers = {
34
34
  return new GitHubConfig("{{escape section.id}}", [opts.repo.repositoryId], [GitHubEventType.ISSUE_COMMENT_CREATED])
35
35
  },
36
36
  /** Trigger when a comment is created on a pull request */
37
- onPRComment(opts: { repo: Repos }): TypedTrigger<GithubPRCommentCreatedTrigger> {
37
+ onPRCommentCreated(opts: { repo: Repos }): TypedTrigger<GithubPRCommentCreatedTrigger> {
38
38
  return new GitHubConfig("{{escape section.id}}", [opts.repo.repositoryId], [GitHubEventType.PR_COMMENT_CREATED])
39
39
  },
40
+ /** Trigger when a comment is edited on a pull request */
41
+ onPRCommentEdited(opts: { repo: Repos }): TypedTrigger<GithubPRCommentEditedTrigger> {
42
+ return new GitHubConfig("{{escape section.id}}", [opts.repo.repositoryId], [GitHubEventType.PR_COMMENT_EDITED])
43
+ },
44
+ /** Trigger when a comment is created or edited on a pull request */
45
+ onPRComment(opts: { repo: Repos }): TypedTrigger<GithubPRCommentTrigger> {
46
+ return new GitHubConfig("{{escape section.id}}", [opts.repo.repositoryId], [GitHubEventType.PR_COMMENT_CREATED, GitHubEventType.PR_COMMENT_EDITED])
47
+ },
40
48
  /** Trigger on specific GitHub events for the given repositories */
41
49
  trigger(opts: { repos: Repos[]; eventTypes?: GitHubEventType[] }): TypedTrigger<GithubTrigger> {
42
50
  return new GitHubConfig("{{escape section.id}}", opts.repos.map(r => r.repositoryId), opts.eventTypes)
@@ -0,0 +1,16 @@
1
+ {{sectionHeader "Google Search Console properties"}}
2
+
3
+ {{> resource-class section.siteClass}}
4
+
5
+ {{#if toolFile}}
6
+ {{sectionHeader "Google Search Console tools"}}
7
+
8
+ {{> tools-slice toolFile}}
9
+
10
+ {{/if}}
11
+ {{sectionHeader "Google Search Console skill"}}
12
+
13
+ /** Google Search Console — read Search Analytics and manage the given properties. A Domain property also covers its subdomains. */
14
+ export function googleSearchConsoleSkill(opts: { sites: GoogleSearchConsoleSite[] }): TypedSkill<{{{section.skillToolType}}}> {
15
+ return new GoogleSearchConsoleOutputConfig("{{escape section.id}}", opts.sites.map(s => s.siteUrl))
16
+ }
@@ -0,0 +1,12 @@
1
+ {{#if toolFile}}
2
+ {{sectionHeader "Higgsfield tools"}}
3
+
4
+ {{> tools-slice toolFile}}
5
+
6
+ {{/if}}
7
+ {{sectionHeader "Higgsfield skill"}}
8
+
9
+ /** Higgsfield — generate ad creative images from a text prompt, then animate them into video. Results are cached by Terse and returned as signed URLs. */
10
+ export function higgsfieldSkill(): TypedSkill<{{{section.skillToolType}}}> {
11
+ return new HiggsfieldOutputConfig("{{escape section.id}}")
12
+ }
@@ -0,0 +1,16 @@
1
+ {{sectionHeader "Meta Ads resources"}}
2
+
3
+ {{> resource-class section.adAccountClass}}
4
+
5
+ {{#if toolFile}}
6
+ {{sectionHeader "Meta Ads tools"}}
7
+
8
+ {{> tools-slice toolFile}}
9
+
10
+ {{/if}}
11
+ {{sectionHeader "Meta Ads skill"}}
12
+
13
+ /** Meta Ads — read performance, create and pause ads, sync audiences, send conversions. Restricts this automation to one ad account and Page; a call naming another is denied. */
14
+ export function metaAdsSkill(opts?: { adAccount?: MetaAdsAdAccount; pageId?: string }): TypedSkill<{{{section.skillToolType}}}> {
15
+ return new MetaAdsOutputConfig("{{escape section.id}}", opts?.adAccount?.accountId ?? null, opts?.pageId ?? null)
16
+ }
@@ -9,6 +9,10 @@
9
9
  // `filter` returns boolean to decide whether the run proceeds.
10
10
  // Every trigger event has event.formatForAgentRunner(): string — the
11
11
  // canonical way to inline the triggering event into an agent prompt.
12
+ // Every trigger event has event.triggeredAt: Date — when Terse received the
13
+ // trigger. Derive every date/window from it (never Date.now()/new Date()):
14
+ // it is fixed for the run, so retries, queue delay, and durable replays all
15
+ // compute the same window.
12
16
  //
13
17
  // Agentic execution:
14
18
  // generateText({ prompt, skills: [...], toolApprovals?, outputSchema? })
@@ -36,6 +40,8 @@
36
40
  // Suspends until a human answers; resolves to
37
41
  // { choice, text?, respondent }. `options` is
38
42
  // [{ id, label, description?, freeText? }].
43
+ // Optional `media: [{ kind: "image" | "video", url,
44
+ // altText? }]` shows creatives inline for review.
39
45
  //
40
46
  // Secrets:
41
47
  // Write with `terse secrets add`; read in job code via process.env.MY_SECRET.