@agent-native/creative-context 0.1.0
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/README.md +108 -0
- package/agent-native.package.json +104 -0
- package/dist/actions/confirm-canonical-logo.d.ts +6 -0
- package/dist/actions/confirm-canonical-logo.d.ts.map +1 -0
- package/dist/actions/confirm-canonical-logo.js +19 -0
- package/dist/actions/confirm-canonical-logo.js.map +1 -0
- package/dist/actions/continue-context-import.d.ts +7 -0
- package/dist/actions/continue-context-import.d.ts.map +1 -0
- package/dist/actions/continue-context-import.js +10 -0
- package/dist/actions/continue-context-import.js.map +1 -0
- package/dist/actions/creative-context-a2a.d.ts +10 -0
- package/dist/actions/creative-context-a2a.d.ts.map +1 -0
- package/dist/actions/creative-context-a2a.js +66 -0
- package/dist/actions/creative-context-a2a.js.map +1 -0
- package/dist/actions/get-brand-profile.d.ts +33 -0
- package/dist/actions/get-brand-profile.d.ts.map +1 -0
- package/dist/actions/get-brand-profile.js +13 -0
- package/dist/actions/get-brand-profile.js.map +1 -0
- package/dist/actions/get-context-import-status.d.ts +22 -0
- package/dist/actions/get-context-import-status.d.ts.map +1 -0
- package/dist/actions/get-context-import-status.js +12 -0
- package/dist/actions/get-context-import-status.js.map +1 -0
- package/dist/actions/get-context-item.d.ts +2 -0
- package/dist/actions/get-context-item.d.ts.map +1 -0
- package/dist/actions/get-context-item.js +2 -0
- package/dist/actions/get-context-item.js.map +1 -0
- package/dist/actions/get-context-pack.d.ts +7 -0
- package/dist/actions/get-context-pack.d.ts.map +1 -0
- package/dist/actions/get-context-pack.js +12 -0
- package/dist/actions/get-context-pack.js.map +1 -0
- package/dist/actions/get-creative-context.d.ts +119 -0
- package/dist/actions/get-creative-context.d.ts.map +1 -0
- package/dist/actions/get-creative-context.js +112 -0
- package/dist/actions/get-creative-context.js.map +1 -0
- package/dist/actions/index.d.ts +3 -0
- package/dist/actions/index.d.ts.map +1 -0
- package/dist/actions/index.js +63 -0
- package/dist/actions/index.js.map +1 -0
- package/dist/actions/infer-brand-dna.d.ts +52 -0
- package/dist/actions/infer-brand-dna.d.ts.map +1 -0
- package/dist/actions/infer-brand-dna.js +13 -0
- package/dist/actions/infer-brand-dna.js.map +1 -0
- package/dist/actions/list-canonical-logo-candidates.d.ts +9 -0
- package/dist/actions/list-canonical-logo-candidates.d.ts.map +1 -0
- package/dist/actions/list-canonical-logo-candidates.js +82 -0
- package/dist/actions/list-canonical-logo-candidates.js.map +1 -0
- package/dist/actions/list-context-connections.d.ts +22 -0
- package/dist/actions/list-context-connections.d.ts.map +1 -0
- package/dist/actions/list-context-connections.js +43 -0
- package/dist/actions/list-context-connections.js.map +1 -0
- package/dist/actions/list-context-packs.d.ts +10 -0
- package/dist/actions/list-context-packs.d.ts.map +1 -0
- package/dist/actions/list-context-packs.js +16 -0
- package/dist/actions/list-context-packs.js.map +1 -0
- package/dist/actions/list-context-sources.d.ts +12 -0
- package/dist/actions/list-context-sources.d.ts.map +1 -0
- package/dist/actions/list-context-sources.js +20 -0
- package/dist/actions/list-context-sources.js.map +1 -0
- package/dist/actions/list-context-suggestions.d.ts +13 -0
- package/dist/actions/list-context-suggestions.d.ts.map +1 -0
- package/dist/actions/list-context-suggestions.js +28 -0
- package/dist/actions/list-context-suggestions.js.map +1 -0
- package/dist/actions/manage-brand-profile.d.ts +28 -0
- package/dist/actions/manage-brand-profile.d.ts.map +1 -0
- package/dist/actions/manage-brand-profile.js +47 -0
- package/dist/actions/manage-brand-profile.js.map +1 -0
- package/dist/actions/manage-context-pack.d.ts +33 -0
- package/dist/actions/manage-context-pack.d.ts.map +1 -0
- package/dist/actions/manage-context-pack.js +65 -0
- package/dist/actions/manage-context-pack.js.map +1 -0
- package/dist/actions/manage-context-source.d.ts +51 -0
- package/dist/actions/manage-context-source.d.ts.map +1 -0
- package/dist/actions/manage-context-source.js +137 -0
- package/dist/actions/manage-context-source.js.map +1 -0
- package/dist/actions/manage-layout-template.d.ts +13 -0
- package/dist/actions/manage-layout-template.d.ts.map +1 -0
- package/dist/actions/manage-layout-template.js +43 -0
- package/dist/actions/manage-layout-template.js.map +1 -0
- package/dist/actions/preview-context-import.d.ts +23 -0
- package/dist/actions/preview-context-import.d.ts.map +1 -0
- package/dist/actions/preview-context-import.js +57 -0
- package/dist/actions/preview-context-import.js.map +1 -0
- package/dist/actions/process-context-purge.d.ts +22 -0
- package/dist/actions/process-context-purge.d.ts.map +1 -0
- package/dist/actions/process-context-purge.js +19 -0
- package/dist/actions/process-context-purge.js.map +1 -0
- package/dist/actions/propose-brand-dna.d.ts +15 -0
- package/dist/actions/propose-brand-dna.d.ts.map +1 -0
- package/dist/actions/propose-brand-dna.js +19 -0
- package/dist/actions/propose-brand-dna.js.map +1 -0
- package/dist/actions/propose-canonical-logo.d.ts +9 -0
- package/dist/actions/propose-canonical-logo.d.ts.map +1 -0
- package/dist/actions/propose-canonical-logo.js +16 -0
- package/dist/actions/propose-canonical-logo.js.map +1 -0
- package/dist/actions/publish-brand-dna.d.ts +13 -0
- package/dist/actions/publish-brand-dna.d.ts.map +1 -0
- package/dist/actions/publish-brand-dna.js +23 -0
- package/dist/actions/publish-brand-dna.js.map +1 -0
- package/dist/actions/recommend-context-roots.d.ts +14 -0
- package/dist/actions/recommend-context-roots.d.ts.map +1 -0
- package/dist/actions/recommend-context-roots.js +22 -0
- package/dist/actions/recommend-context-roots.js.map +1 -0
- package/dist/actions/record-context-feedback.d.ts +10 -0
- package/dist/actions/record-context-feedback.d.ts.map +1 -0
- package/dist/actions/record-context-feedback.js +14 -0
- package/dist/actions/record-context-feedback.js.map +1 -0
- package/dist/actions/review-context-items.d.ts +35 -0
- package/dist/actions/review-context-items.d.ts.map +1 -0
- package/dist/actions/review-context-items.js +65 -0
- package/dist/actions/review-context-items.js.map +1 -0
- package/dist/actions/run-embedding-bakeoff.d.ts +15 -0
- package/dist/actions/run-embedding-bakeoff.d.ts.map +1 -0
- package/dist/actions/run-embedding-bakeoff.js +72 -0
- package/dist/actions/run-embedding-bakeoff.js.map +1 -0
- package/dist/actions/search-creative-context.d.ts +75 -0
- package/dist/actions/search-creative-context.d.ts.map +1 -0
- package/dist/actions/search-creative-context.js +41 -0
- package/dist/actions/search-creative-context.js.map +1 -0
- package/dist/actions/set-brand-dna.d.ts +15 -0
- package/dist/actions/set-brand-dna.d.ts.map +1 -0
- package/dist/actions/set-brand-dna.js +19 -0
- package/dist/actions/set-brand-dna.js.map +1 -0
- package/dist/actions/start-context-enrichment.d.ts +10 -0
- package/dist/actions/start-context-enrichment.d.ts.map +1 -0
- package/dist/actions/start-context-enrichment.js +46 -0
- package/dist/actions/start-context-enrichment.js.map +1 -0
- package/dist/actions/start-context-import.d.ts +9 -0
- package/dist/actions/start-context-import.d.ts.map +1 -0
- package/dist/actions/start-context-import.js +36 -0
- package/dist/actions/start-context-import.js.map +1 -0
- package/dist/client/CreativeContextChip.d.ts +13 -0
- package/dist/client/CreativeContextChip.d.ts.map +1 -0
- package/dist/client/CreativeContextChip.js +45 -0
- package/dist/client/CreativeContextChip.js.map +1 -0
- package/dist/client/CreativeContextPanel.d.ts +131 -0
- package/dist/client/CreativeContextPanel.d.ts.map +1 -0
- package/dist/client/CreativeContextPanel.js +778 -0
- package/dist/client/CreativeContextPanel.js.map +1 -0
- package/dist/client/CreativeContextSettingsLink.d.ts +4 -0
- package/dist/client/CreativeContextSettingsLink.d.ts.map +1 -0
- package/dist/client/CreativeContextSettingsLink.js +8 -0
- package/dist/client/CreativeContextSettingsLink.js.map +1 -0
- package/dist/client/actions.d.ts +256 -0
- package/dist/client/actions.d.ts.map +1 -0
- package/dist/client/actions.js +89 -0
- package/dist/client/actions.js.map +1 -0
- package/dist/client/agent-tab.d.ts +9 -0
- package/dist/client/agent-tab.d.ts.map +1 -0
- package/dist/client/agent-tab.js +32 -0
- package/dist/client/agent-tab.js.map +1 -0
- package/dist/client/application-state.d.ts +22 -0
- package/dist/client/application-state.d.ts.map +1 -0
- package/dist/client/application-state.js +88 -0
- package/dist/client/application-state.js.map +1 -0
- package/dist/client/index.d.ts +8 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +8 -0
- package/dist/client/index.js.map +1 -0
- package/dist/client/messages.d.ts +5 -0
- package/dist/client/messages.d.ts.map +1 -0
- package/dist/client/messages.js +1059 -0
- package/dist/client/messages.js.map +1 -0
- package/dist/connectors/context.d.ts +9 -0
- package/dist/connectors/context.d.ts.map +1 -0
- package/dist/connectors/context.js +59 -0
- package/dist/connectors/context.js.map +1 -0
- package/dist/connectors/document-parser.d.ts +2 -0
- package/dist/connectors/document-parser.d.ts.map +1 -0
- package/dist/connectors/document-parser.js +2 -0
- package/dist/connectors/document-parser.js.map +1 -0
- package/dist/connectors/figma-native.d.ts +18 -0
- package/dist/connectors/figma-native.d.ts.map +1 -0
- package/dist/connectors/figma-native.js +883 -0
- package/dist/connectors/figma-native.js.map +1 -0
- package/dist/connectors/figma.d.ts +10 -0
- package/dist/connectors/figma.d.ts.map +1 -0
- package/dist/connectors/figma.js +166 -0
- package/dist/connectors/figma.js.map +1 -0
- package/dist/connectors/google-slides-native.d.ts +58 -0
- package/dist/connectors/google-slides-native.d.ts.map +1 -0
- package/dist/connectors/google-slides-native.js +1118 -0
- package/dist/connectors/google-slides-native.js.map +1 -0
- package/dist/connectors/google-slides.d.ts +15 -0
- package/dist/connectors/google-slides.d.ts.map +1 -0
- package/dist/connectors/google-slides.js +896 -0
- package/dist/connectors/google-slides.js.map +1 -0
- package/dist/connectors/index.d.ts +20 -0
- package/dist/connectors/index.d.ts.map +1 -0
- package/dist/connectors/index.js +44 -0
- package/dist/connectors/index.js.map +1 -0
- package/dist/connectors/manual.d.ts +9 -0
- package/dist/connectors/manual.d.ts.map +1 -0
- package/dist/connectors/manual.js +91 -0
- package/dist/connectors/manual.js.map +1 -0
- package/dist/connectors/normalize.d.ts +35 -0
- package/dist/connectors/normalize.d.ts.map +1 -0
- package/dist/connectors/normalize.js +216 -0
- package/dist/connectors/normalize.js.map +1 -0
- package/dist/connectors/notion.d.ts +10 -0
- package/dist/connectors/notion.d.ts.map +1 -0
- package/dist/connectors/notion.js +393 -0
- package/dist/connectors/notion.js.map +1 -0
- package/dist/connectors/private-artifacts.d.ts +39 -0
- package/dist/connectors/private-artifacts.d.ts.map +1 -0
- package/dist/connectors/private-artifacts.js +175 -0
- package/dist/connectors/private-artifacts.js.map +1 -0
- package/dist/connectors/provider-response.d.ts +20 -0
- package/dist/connectors/provider-response.d.ts.map +1 -0
- package/dist/connectors/provider-response.js +98 -0
- package/dist/connectors/provider-response.js.map +1 -0
- package/dist/connectors/recommendations.d.ts +25 -0
- package/dist/connectors/recommendations.d.ts.map +1 -0
- package/dist/connectors/recommendations.js +172 -0
- package/dist/connectors/recommendations.js.map +1 -0
- package/dist/connectors/registry.d.ts +10 -0
- package/dist/connectors/registry.d.ts.map +1 -0
- package/dist/connectors/registry.js +34 -0
- package/dist/connectors/registry.js.map +1 -0
- package/dist/connectors/rendered-page.d.ts +101 -0
- package/dist/connectors/rendered-page.d.ts.map +1 -0
- package/dist/connectors/rendered-page.js +504 -0
- package/dist/connectors/rendered-page.js.map +1 -0
- package/dist/connectors/smart-defaults.d.ts +9 -0
- package/dist/connectors/smart-defaults.d.ts.map +1 -0
- package/dist/connectors/smart-defaults.js +72 -0
- package/dist/connectors/smart-defaults.js.map +1 -0
- package/dist/connectors/types.d.ts +79 -0
- package/dist/connectors/types.d.ts.map +1 -0
- package/dist/connectors/types.js +2 -0
- package/dist/connectors/types.js.map +1 -0
- package/dist/connectors/upload.d.ts +9 -0
- package/dist/connectors/upload.d.ts.map +1 -0
- package/dist/connectors/upload.js +440 -0
- package/dist/connectors/upload.js.map +1 -0
- package/dist/connectors/website.d.ts +20 -0
- package/dist/connectors/website.d.ts.map +1 -0
- package/dist/connectors/website.js +616 -0
- package/dist/connectors/website.js.map +1 -0
- package/dist/embeddings/index.d.ts +3 -0
- package/dist/embeddings/index.d.ts.map +1 -0
- package/dist/embeddings/index.js +3 -0
- package/dist/embeddings/index.js.map +1 -0
- package/dist/embeddings/providers.d.ts +7 -0
- package/dist/embeddings/providers.d.ts.map +1 -0
- package/dist/embeddings/providers.js +176 -0
- package/dist/embeddings/providers.js.map +1 -0
- package/dist/embeddings/types.d.ts +19 -0
- package/dist/embeddings/types.d.ts.map +1 -0
- package/dist/embeddings/types.js +2 -0
- package/dist/embeddings/types.js.map +1 -0
- package/dist/eval/acceptance-fixtures.d.ts +3 -0
- package/dist/eval/acceptance-fixtures.d.ts.map +1 -0
- package/dist/eval/acceptance-fixtures.js +84 -0
- package/dist/eval/acceptance-fixtures.js.map +1 -0
- package/dist/eval/acceptance.d.ts +114 -0
- package/dist/eval/acceptance.d.ts.map +1 -0
- package/dist/eval/acceptance.js +260 -0
- package/dist/eval/acceptance.js.map +1 -0
- package/dist/eval/fixtures.d.ts +16 -0
- package/dist/eval/fixtures.d.ts.map +1 -0
- package/dist/eval/fixtures.js +119 -0
- package/dist/eval/fixtures.js.map +1 -0
- package/dist/eval/index.d.ts +63 -0
- package/dist/eval/index.d.ts.map +1 -0
- package/dist/eval/index.js +174 -0
- package/dist/eval/index.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -0
- package/dist/jobs/background-worker.d.ts +31 -0
- package/dist/jobs/background-worker.d.ts.map +1 -0
- package/dist/jobs/background-worker.js +315 -0
- package/dist/jobs/background-worker.js.map +1 -0
- package/dist/jobs/import-runner.d.ts +3 -0
- package/dist/jobs/import-runner.d.ts.map +1 -0
- package/dist/jobs/import-runner.js +613 -0
- package/dist/jobs/import-runner.js.map +1 -0
- package/dist/jobs/index.d.ts +9 -0
- package/dist/jobs/index.d.ts.map +1 -0
- package/dist/jobs/index.js +8 -0
- package/dist/jobs/index.js.map +1 -0
- package/dist/jobs/progress.d.ts +3 -0
- package/dist/jobs/progress.d.ts.map +1 -0
- package/dist/jobs/progress.js +30 -0
- package/dist/jobs/progress.js.map +1 -0
- package/dist/jobs/rebuild.d.ts +13 -0
- package/dist/jobs/rebuild.d.ts.map +1 -0
- package/dist/jobs/rebuild.js +178 -0
- package/dist/jobs/rebuild.js.map +1 -0
- package/dist/jobs/server-worker.d.ts +16 -0
- package/dist/jobs/server-worker.d.ts.map +1 -0
- package/dist/jobs/server-worker.js +252 -0
- package/dist/jobs/server-worker.js.map +1 -0
- package/dist/jobs/store-adapter.d.ts +3 -0
- package/dist/jobs/store-adapter.d.ts.map +1 -0
- package/dist/jobs/store-adapter.js +37 -0
- package/dist/jobs/store-adapter.js.map +1 -0
- package/dist/jobs/types.d.ts +138 -0
- package/dist/jobs/types.d.ts.map +1 -0
- package/dist/jobs/types.js +2 -0
- package/dist/jobs/types.js.map +1 -0
- package/dist/jobs/worker.d.ts +27 -0
- package/dist/jobs/worker.d.ts.map +1 -0
- package/dist/jobs/worker.js +90 -0
- package/dist/jobs/worker.js.map +1 -0
- package/dist/media-url.d.ts +7 -0
- package/dist/media-url.d.ts.map +1 -0
- package/dist/media-url.js +15 -0
- package/dist/media-url.js.map +1 -0
- package/dist/native-artifact-reassembly.d.ts +25 -0
- package/dist/native-artifact-reassembly.d.ts.map +1 -0
- package/dist/native-artifact-reassembly.js +262 -0
- package/dist/native-artifact-reassembly.js.map +1 -0
- package/dist/native-artifact.d.ts +88 -0
- package/dist/native-artifact.d.ts.map +1 -0
- package/dist/native-artifact.js +86 -0
- package/dist/native-artifact.js.map +1 -0
- package/dist/schema/index.d.ts +5519 -0
- package/dist/schema/index.d.ts.map +1 -0
- package/dist/schema/index.js +374 -0
- package/dist/schema/index.js.map +1 -0
- package/dist/schema/migrations.d.ts +10 -0
- package/dist/schema/migrations.d.ts.map +1 -0
- package/dist/schema/migrations.js +253 -0
- package/dist/schema/migrations.js.map +1 -0
- package/dist/search/fusion.d.ts +15 -0
- package/dist/search/fusion.d.ts.map +1 -0
- package/dist/search/fusion.js +25 -0
- package/dist/search/fusion.js.map +1 -0
- package/dist/search/mode.d.ts +4 -0
- package/dist/search/mode.d.ts.map +1 -0
- package/dist/search/mode.js +13 -0
- package/dist/search/mode.js.map +1 -0
- package/dist/search/postgres-fts.d.ts +22 -0
- package/dist/search/postgres-fts.d.ts.map +1 -0
- package/dist/search/postgres-fts.js +83 -0
- package/dist/search/postgres-fts.js.map +1 -0
- package/dist/server/brand-context.d.ts +15 -0
- package/dist/server/brand-context.d.ts.map +1 -0
- package/dist/server/brand-context.js +149 -0
- package/dist/server/brand-context.js.map +1 -0
- package/dist/server/context.d.ts +77 -0
- package/dist/server/context.d.ts.map +1 -0
- package/dist/server/context.js +63 -0
- package/dist/server/context.js.map +1 -0
- package/dist/server/enrichment.d.ts +23 -0
- package/dist/server/enrichment.d.ts.map +1 -0
- package/dist/server/enrichment.js +136 -0
- package/dist/server/enrichment.js.map +1 -0
- package/dist/server/generation-artifact-access.d.ts +21 -0
- package/dist/server/generation-artifact-access.d.ts.map +1 -0
- package/dist/server/generation-artifact-access.js +111 -0
- package/dist/server/generation-artifact-access.js.map +1 -0
- package/dist/server/generation-context.d.ts +204 -0
- package/dist/server/generation-context.d.ts.map +1 -0
- package/dist/server/generation-context.js +310 -0
- package/dist/server/generation-context.js.map +1 -0
- package/dist/server/index.d.ts +22 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +96 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/isolated-a2a.d.ts +172 -0
- package/dist/server/isolated-a2a.d.ts.map +1 -0
- package/dist/server/isolated-a2a.js +310 -0
- package/dist/server/isolated-a2a.js.map +1 -0
- package/dist/server/media.d.ts +15 -0
- package/dist/server/media.d.ts.map +1 -0
- package/dist/server/media.js +93 -0
- package/dist/server/media.js.map +1 -0
- package/dist/server/prompt-provider.d.ts +5 -0
- package/dist/server/prompt-provider.d.ts.map +1 -0
- package/dist/server/prompt-provider.js +59 -0
- package/dist/server/prompt-provider.js.map +1 -0
- package/dist/server/public-serialization.d.ts +160 -0
- package/dist/server/public-serialization.d.ts.map +1 -0
- package/dist/server/public-serialization.js +108 -0
- package/dist/server/public-serialization.js.map +1 -0
- package/dist/server/resource-paths.d.ts +3 -0
- package/dist/server/resource-paths.d.ts.map +1 -0
- package/dist/server/resource-paths.js +5 -0
- package/dist/server/resource-paths.js.map +1 -0
- package/dist/server/retrieval.d.ts +78 -0
- package/dist/server/retrieval.d.ts.map +1 -0
- package/dist/server/retrieval.js +443 -0
- package/dist/server/retrieval.js.map +1 -0
- package/dist/server/untrusted-reference.d.ts +8 -0
- package/dist/server/untrusted-reference.d.ts.map +1 -0
- package/dist/server/untrusted-reference.js +19 -0
- package/dist/server/untrusted-reference.js.map +1 -0
- package/dist/store/brand.d.ts +47 -0
- package/dist/store/brand.d.ts.map +1 -0
- package/dist/store/brand.js +360 -0
- package/dist/store/brand.js.map +1 -0
- package/dist/store/content.d.ts +120 -0
- package/dist/store/content.d.ts.map +1 -0
- package/dist/store/content.js +1437 -0
- package/dist/store/content.js.map +1 -0
- package/dist/store/generation.d.ts +28 -0
- package/dist/store/generation.d.ts.map +1 -0
- package/dist/store/generation.js +140 -0
- package/dist/store/generation.js.map +1 -0
- package/dist/store/helpers.d.ts +12 -0
- package/dist/store/helpers.d.ts.map +1 -0
- package/dist/store/helpers.js +41 -0
- package/dist/store/helpers.js.map +1 -0
- package/dist/store/index.d.ts +10 -0
- package/dist/store/index.d.ts.map +1 -0
- package/dist/store/index.js +10 -0
- package/dist/store/index.js.map +1 -0
- package/dist/store/inference.d.ts +57 -0
- package/dist/store/inference.d.ts.map +1 -0
- package/dist/store/inference.js +279 -0
- package/dist/store/inference.js.map +1 -0
- package/dist/store/jobs.d.ts +80 -0
- package/dist/store/jobs.d.ts.map +1 -0
- package/dist/store/jobs.js +428 -0
- package/dist/store/jobs.js.map +1 -0
- package/dist/store/packs.d.ts +33 -0
- package/dist/store/packs.d.ts.map +1 -0
- package/dist/store/packs.js +321 -0
- package/dist/store/packs.js.map +1 -0
- package/dist/store/purge.d.ts +16 -0
- package/dist/store/purge.d.ts.map +1 -0
- package/dist/store/purge.js +256 -0
- package/dist/store/purge.js.map +1 -0
- package/dist/store/sources.d.ts +76 -0
- package/dist/store/sources.d.ts.map +1 -0
- package/dist/store/sources.js +538 -0
- package/dist/store/sources.js.map +1 -0
- package/dist/store/suggestions.d.ts +28 -0
- package/dist/store/suggestions.d.ts.map +1 -0
- package/dist/store/suggestions.js +250 -0
- package/dist/store/suggestions.js.map +1 -0
- package/dist/types.d.ts +493 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/vector/index.d.ts +2 -0
- package/dist/vector/index.d.ts.map +1 -0
- package/dist/vector/index.js +2 -0
- package/dist/vector/index.js.map +1 -0
- package/dist/vector/pgvector.d.ts +28 -0
- package/dist/vector/pgvector.d.ts.map +1 -0
- package/dist/vector/pgvector.js +117 -0
- package/dist/vector/pgvector.js.map +1 -0
- package/docs/evaluation.md +92 -0
- package/docs/llms-full.txt +168 -0
- package/docs/llms.txt +76 -0
- package/docs/skills/creative-context/SKILL.md +74 -0
- package/package.json +91 -0
- package/src/actions/agent-input-schemas.spec.ts +46 -0
- package/src/actions/confirm-canonical-logo.ts +20 -0
- package/src/actions/continue-context-import.ts +12 -0
- package/src/actions/creative-context-a2a.spec.ts +64 -0
- package/src/actions/creative-context-a2a.ts +88 -0
- package/src/actions/get-brand-profile.ts +16 -0
- package/src/actions/get-context-import-status.ts +13 -0
- package/src/actions/get-context-item.ts +1 -0
- package/src/actions/get-context-pack.ts +14 -0
- package/src/actions/get-creative-context.spec.ts +315 -0
- package/src/actions/get-creative-context.ts +148 -0
- package/src/actions/index.ts +65 -0
- package/src/actions/infer-brand-dna.ts +15 -0
- package/src/actions/list-canonical-logo-candidates.ts +121 -0
- package/src/actions/list-context-connections.spec.ts +23 -0
- package/src/actions/list-context-connections.ts +51 -0
- package/src/actions/list-context-packs.ts +17 -0
- package/src/actions/list-context-sources.ts +21 -0
- package/src/actions/list-context-suggestions.ts +30 -0
- package/src/actions/manage-brand-profile.ts +58 -0
- package/src/actions/manage-context-pack.ts +75 -0
- package/src/actions/manage-context-source.ts +154 -0
- package/src/actions/manage-layout-template.ts +51 -0
- package/src/actions/preview-context-import.spec.ts +64 -0
- package/src/actions/preview-context-import.ts +61 -0
- package/src/actions/process-context-purge.ts +25 -0
- package/src/actions/propose-brand-dna.ts +22 -0
- package/src/actions/propose-canonical-logo.ts +19 -0
- package/src/actions/publish-brand-dna.ts +25 -0
- package/src/actions/recommend-context-roots.ts +24 -0
- package/src/actions/record-context-feedback.ts +16 -0
- package/src/actions/review-context-items.ts +69 -0
- package/src/actions/run-embedding-bakeoff.ts +90 -0
- package/src/actions/search-creative-context.ts +47 -0
- package/src/actions/set-brand-dna.ts +22 -0
- package/src/actions/start-context-enrichment.ts +50 -0
- package/src/actions/start-context-import.ts +37 -0
- package/src/client/CreativeContextChip.tsx +162 -0
- package/src/client/CreativeContextPanel.tsx +2442 -0
- package/src/client/CreativeContextSettingsLink.tsx +30 -0
- package/src/client/actions.ts +438 -0
- package/src/client/agent-tab.tsx +58 -0
- package/src/client/application-state.spec.ts +41 -0
- package/src/client/application-state.ts +130 -0
- package/src/client/index.ts +62 -0
- package/src/client/messages.ts +1240 -0
- package/src/client/source-config.spec.ts +152 -0
- package/src/connectors/connectors.spec.ts +778 -0
- package/src/connectors/context.ts +83 -0
- package/src/connectors/document-parser.ts +5 -0
- package/src/connectors/figma-native.ts +1192 -0
- package/src/connectors/figma-native.visual.spec.ts +221 -0
- package/src/connectors/figma.spec.ts +812 -0
- package/src/connectors/figma.ts +257 -0
- package/src/connectors/fixtures/google-slides-native.json +353 -0
- package/src/connectors/google-slides-native.spec.ts +804 -0
- package/src/connectors/google-slides-native.ts +1656 -0
- package/src/connectors/google-slides-native.visual.spec.ts +119 -0
- package/src/connectors/google-slides.ts +1172 -0
- package/src/connectors/index.ts +103 -0
- package/src/connectors/manual.ts +132 -0
- package/src/connectors/normalize.ts +277 -0
- package/src/connectors/notion.ts +529 -0
- package/src/connectors/private-artifacts.spec.ts +95 -0
- package/src/connectors/private-artifacts.ts +248 -0
- package/src/connectors/provider-response.ts +144 -0
- package/src/connectors/recommendations.ts +237 -0
- package/src/connectors/registry.ts +48 -0
- package/src/connectors/rendered-page.ts +705 -0
- package/src/connectors/smart-defaults.spec.ts +135 -0
- package/src/connectors/smart-defaults.ts +87 -0
- package/src/connectors/types.ts +115 -0
- package/src/connectors/upload.spec.ts +175 -0
- package/src/connectors/upload.ts +548 -0
- package/src/connectors/website.spec.ts +509 -0
- package/src/connectors/website.ts +777 -0
- package/src/embeddings/index.ts +2 -0
- package/src/embeddings/providers.spec.ts +73 -0
- package/src/embeddings/providers.ts +228 -0
- package/src/embeddings/types.ts +24 -0
- package/src/eval/acceptance-fixtures.ts +97 -0
- package/src/eval/acceptance.spec.ts +92 -0
- package/src/eval/acceptance.ts +371 -0
- package/src/eval/connectors-golden.spec.ts +421 -0
- package/src/eval/eval.spec.ts +166 -0
- package/src/eval/fixtures/README.md +17 -0
- package/src/eval/fixtures/figma-brand-system-v1.json +140 -0
- package/src/eval/fixtures/figma-brand-system-v2.json +127 -0
- package/src/eval/fixtures/launch-hero.png +0 -0
- package/src/eval/fixtures/launch-system-v1.pptx +0 -0
- package/src/eval/fixtures/launch-system-v2.pptx +0 -0
- package/src/eval/fixtures/notion-brand-root.json +218 -0
- package/src/eval/fixtures/pricing-hero.png +0 -0
- package/src/eval/fixtures/rendered-brand-page.html +76 -0
- package/src/eval/fixtures.spec.ts +43 -0
- package/src/eval/fixtures.ts +136 -0
- package/src/eval/index.ts +291 -0
- package/src/eval/library-flow.acceptance.spec.tsx +141 -0
- package/src/index.ts +4 -0
- package/src/jobs/background-worker.ts +423 -0
- package/src/jobs/import-runner.spec.ts +582 -0
- package/src/jobs/import-runner.ts +792 -0
- package/src/jobs/index.ts +40 -0
- package/src/jobs/progress.ts +37 -0
- package/src/jobs/rebuild.ts +245 -0
- package/src/jobs/server-worker.spec.ts +159 -0
- package/src/jobs/server-worker.ts +344 -0
- package/src/jobs/store-adapter.ts +52 -0
- package/src/jobs/types.ts +147 -0
- package/src/jobs/worker.ts +152 -0
- package/src/manifest.spec.ts +26 -0
- package/src/media-url.ts +17 -0
- package/src/native-artifact-reassembly.spec.ts +386 -0
- package/src/native-artifact-reassembly.ts +406 -0
- package/src/native-artifact.ts +102 -0
- package/src/schema/index.ts +411 -0
- package/src/schema/migrations.spec.ts +41 -0
- package/src/schema/migrations.ts +258 -0
- package/src/search/fusion.spec.ts +21 -0
- package/src/search/fusion.ts +39 -0
- package/src/search/mode.spec.ts +28 -0
- package/src/search/mode.ts +21 -0
- package/src/search/postgres-fts.spec.ts +71 -0
- package/src/search/postgres-fts.ts +112 -0
- package/src/server/brand-context.spec.ts +43 -0
- package/src/server/brand-context.ts +160 -0
- package/src/server/context.ts +162 -0
- package/src/server/enrichment.ts +163 -0
- package/src/server/generation-artifact-access.ts +216 -0
- package/src/server/generation-context-a2a.spec.ts +131 -0
- package/src/server/generation-context-off.spec.ts +213 -0
- package/src/server/generation-context.spec.ts +124 -0
- package/src/server/generation-context.ts +493 -0
- package/src/server/index.ts +135 -0
- package/src/server/isolated-a2a.spec.ts +164 -0
- package/src/server/isolated-a2a.ts +413 -0
- package/src/server/media.spec.ts +92 -0
- package/src/server/media.ts +117 -0
- package/src/server/prompt-provider.spec.ts +78 -0
- package/src/server/prompt-provider.ts +73 -0
- package/src/server/public-serialization.spec.ts +149 -0
- package/src/server/public-serialization.ts +130 -0
- package/src/server/resource-paths.spec.ts +9 -0
- package/src/server/resource-paths.ts +5 -0
- package/src/server/retrieval-vector.spec.ts +180 -0
- package/src/server/retrieval.ts +587 -0
- package/src/server/untrusted-reference.spec.ts +22 -0
- package/src/server/untrusted-reference.ts +24 -0
- package/src/store/access.integration.spec.ts +1922 -0
- package/src/store/brand.ts +477 -0
- package/src/store/content.ts +1900 -0
- package/src/store/generation.ts +226 -0
- package/src/store/helpers.ts +53 -0
- package/src/store/index.ts +9 -0
- package/src/store/inference.spec.ts +84 -0
- package/src/store/inference.ts +339 -0
- package/src/store/invariants.spec.ts +119 -0
- package/src/store/jobs.ts +672 -0
- package/src/store/packs.ts +466 -0
- package/src/store/purge.ts +321 -0
- package/src/store/sources.spec.ts +102 -0
- package/src/store/sources.ts +708 -0
- package/src/store/suggestions.ts +333 -0
- package/src/types.ts +571 -0
- package/src/vector/index.ts +1 -0
- package/src/vector/pgvector.spec.ts +98 -0
- package/src/vector/pgvector.ts +164 -0
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { defineAction } from "@agent-native/core/action";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
archiveContextSource,
|
|
6
|
+
createContextSource,
|
|
7
|
+
deleteContextSource,
|
|
8
|
+
previewContextSourcePromotion,
|
|
9
|
+
promoteContextSource,
|
|
10
|
+
restoreContextSource,
|
|
11
|
+
toSourceSummary,
|
|
12
|
+
updateContextSource,
|
|
13
|
+
} from "../store/index.js";
|
|
14
|
+
|
|
15
|
+
const upstreamAccess = z.enum(["available", "restricted", "unknown"]);
|
|
16
|
+
const sourceStatus = z.enum(["active", "paused", "archived", "error"]);
|
|
17
|
+
const schema = z.discriminatedUnion("operation", [
|
|
18
|
+
z.object({
|
|
19
|
+
operation: z.literal("create"),
|
|
20
|
+
name: z.string().trim().min(1).max(200),
|
|
21
|
+
kind: z.enum([
|
|
22
|
+
"manual",
|
|
23
|
+
"upload",
|
|
24
|
+
"google-slides",
|
|
25
|
+
"figma",
|
|
26
|
+
"notion",
|
|
27
|
+
"website",
|
|
28
|
+
]),
|
|
29
|
+
externalRef: z.string().max(2000).optional(),
|
|
30
|
+
connectionId: z.string().max(500).optional(),
|
|
31
|
+
config: z.record(z.string(), z.unknown()).optional(),
|
|
32
|
+
upstreamAccess: upstreamAccess.optional(),
|
|
33
|
+
}),
|
|
34
|
+
z.object({
|
|
35
|
+
operation: z.literal("update"),
|
|
36
|
+
sourceId: z.string().min(1),
|
|
37
|
+
patch: z.object({
|
|
38
|
+
name: z.string().trim().min(1).max(200).optional(),
|
|
39
|
+
externalRef: z.string().max(2000).nullable().optional(),
|
|
40
|
+
connectionId: z.string().max(500).nullable().optional(),
|
|
41
|
+
config: z.record(z.string(), z.unknown()).optional(),
|
|
42
|
+
status: sourceStatus.optional(),
|
|
43
|
+
upstreamAccess: upstreamAccess.optional(),
|
|
44
|
+
}),
|
|
45
|
+
}),
|
|
46
|
+
z.object({
|
|
47
|
+
operation: z.enum(["archive", "restore", "delete"]),
|
|
48
|
+
sourceId: z.string().min(1),
|
|
49
|
+
}),
|
|
50
|
+
z.object({
|
|
51
|
+
operation: z.literal("preview-promotion"),
|
|
52
|
+
sourceId: z.string().min(1),
|
|
53
|
+
}),
|
|
54
|
+
z.object({
|
|
55
|
+
operation: z.literal("promote"),
|
|
56
|
+
sourceId: z.string().min(1),
|
|
57
|
+
confirmation: z.object({
|
|
58
|
+
containerRef: z.string().min(1),
|
|
59
|
+
boundaryHash: z.string().length(64),
|
|
60
|
+
itemCount: z.number().int().min(0),
|
|
61
|
+
}),
|
|
62
|
+
}),
|
|
63
|
+
]);
|
|
64
|
+
|
|
65
|
+
const agentInputSchema = z.object({
|
|
66
|
+
operation: z.enum([
|
|
67
|
+
"create",
|
|
68
|
+
"update",
|
|
69
|
+
"archive",
|
|
70
|
+
"restore",
|
|
71
|
+
"delete",
|
|
72
|
+
"preview-promotion",
|
|
73
|
+
"promote",
|
|
74
|
+
]),
|
|
75
|
+
sourceId: z.string().min(1).optional(),
|
|
76
|
+
name: z.string().trim().min(1).max(200).optional(),
|
|
77
|
+
kind: z
|
|
78
|
+
.enum(["manual", "upload", "google-slides", "figma", "notion", "website"])
|
|
79
|
+
.optional(),
|
|
80
|
+
externalRef: z.string().max(2000).optional(),
|
|
81
|
+
connectionId: z.string().max(500).optional(),
|
|
82
|
+
config: z.record(z.string(), z.unknown()).optional(),
|
|
83
|
+
upstreamAccess: upstreamAccess.optional(),
|
|
84
|
+
patch: z
|
|
85
|
+
.object({
|
|
86
|
+
name: z.string().trim().min(1).max(200).optional(),
|
|
87
|
+
externalRef: z.string().max(2000).nullable().optional(),
|
|
88
|
+
connectionId: z.string().max(500).nullable().optional(),
|
|
89
|
+
config: z.record(z.string(), z.unknown()).optional(),
|
|
90
|
+
status: sourceStatus.optional(),
|
|
91
|
+
upstreamAccess: upstreamAccess.optional(),
|
|
92
|
+
})
|
|
93
|
+
.optional(),
|
|
94
|
+
confirmation: z
|
|
95
|
+
.object({
|
|
96
|
+
containerRef: z.string().min(1),
|
|
97
|
+
boundaryHash: z.string().length(64),
|
|
98
|
+
itemCount: z.number().int().min(0),
|
|
99
|
+
})
|
|
100
|
+
.optional(),
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
export default defineAction({
|
|
104
|
+
description:
|
|
105
|
+
"Create or update a private source, archive/restore it, preview a deliberate org promotion, promote after confirming container and count, or tombstone it and enqueue purge.",
|
|
106
|
+
schema,
|
|
107
|
+
agentInputSchema,
|
|
108
|
+
needsApproval: (args) =>
|
|
109
|
+
args.operation === "delete" || args.operation === "promote",
|
|
110
|
+
publicAgent: {
|
|
111
|
+
expose: true,
|
|
112
|
+
readOnly: false,
|
|
113
|
+
requiresAuth: true,
|
|
114
|
+
isConsequential: true,
|
|
115
|
+
},
|
|
116
|
+
run: async (args) => {
|
|
117
|
+
if (args.operation === "create") {
|
|
118
|
+
const source = await createContextSource(args);
|
|
119
|
+
return { source: toSourceSummary(source), deleted: false };
|
|
120
|
+
}
|
|
121
|
+
if (args.operation === "update") {
|
|
122
|
+
const source = await updateContextSource(args.sourceId, args.patch);
|
|
123
|
+
return { source: toSourceSummary(source), deleted: false };
|
|
124
|
+
}
|
|
125
|
+
if (args.operation === "archive") {
|
|
126
|
+
const source = await archiveContextSource(args.sourceId);
|
|
127
|
+
return { source: toSourceSummary(source), deleted: false };
|
|
128
|
+
}
|
|
129
|
+
if (args.operation === "restore") {
|
|
130
|
+
const source = await restoreContextSource(args.sourceId);
|
|
131
|
+
return { source: toSourceSummary(source), deleted: false };
|
|
132
|
+
}
|
|
133
|
+
if (args.operation === "preview-promotion") {
|
|
134
|
+
return {
|
|
135
|
+
source: null,
|
|
136
|
+
deleted: false,
|
|
137
|
+
promotionPreview: await previewContextSourcePromotion(args.sourceId),
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
if (args.operation === "promote") {
|
|
141
|
+
const source = await promoteContextSource(
|
|
142
|
+
args.sourceId,
|
|
143
|
+
args.confirmation,
|
|
144
|
+
);
|
|
145
|
+
return { source: toSourceSummary(source), deleted: false };
|
|
146
|
+
}
|
|
147
|
+
const deleted = await deleteContextSource(args.sourceId);
|
|
148
|
+
return {
|
|
149
|
+
source: toSourceSummary(deleted.source),
|
|
150
|
+
deleted: true,
|
|
151
|
+
purgeJobId: deleted.purgeJobId,
|
|
152
|
+
};
|
|
153
|
+
},
|
|
154
|
+
});
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { defineAction } from "@agent-native/core/action";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
proposeCreativeContextSuggestion,
|
|
6
|
+
applyLayoutTemplateSuggestion,
|
|
7
|
+
} from "../store/index.js";
|
|
8
|
+
|
|
9
|
+
const schema = z.discriminatedUnion("operation", [
|
|
10
|
+
z.object({
|
|
11
|
+
operation: z.literal("propose"),
|
|
12
|
+
profileId: z.string().min(1).optional(),
|
|
13
|
+
itemId: z.string().min(1),
|
|
14
|
+
itemVersionId: z.string().min(1).optional(),
|
|
15
|
+
reason: z.string().max(5000).optional(),
|
|
16
|
+
payload: z.record(z.string(), z.unknown()).optional(),
|
|
17
|
+
}),
|
|
18
|
+
z.object({
|
|
19
|
+
operation: z.enum(["promote", "demote", "reject"]),
|
|
20
|
+
suggestionId: z.string().min(1),
|
|
21
|
+
}),
|
|
22
|
+
]);
|
|
23
|
+
|
|
24
|
+
const agentInputSchema = z.object({
|
|
25
|
+
operation: z.enum(["propose", "promote", "demote", "reject"]),
|
|
26
|
+
profileId: z.string().min(1).optional(),
|
|
27
|
+
itemId: z.string().min(1).optional(),
|
|
28
|
+
itemVersionId: z.string().min(1).optional(),
|
|
29
|
+
reason: z.string().max(5000).optional(),
|
|
30
|
+
payload: z.record(z.string(), z.unknown()).optional(),
|
|
31
|
+
suggestionId: z.string().min(1).optional(),
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
export default defineAction({
|
|
35
|
+
description:
|
|
36
|
+
"Propose, promote, demote, or reject a reusable layout-template suggestion pinned to an exact item version.",
|
|
37
|
+
schema,
|
|
38
|
+
agentInputSchema,
|
|
39
|
+
needsApproval: (args) => args.operation !== "propose",
|
|
40
|
+
publicAgent: { expose: true, readOnly: false, requiresAuth: true },
|
|
41
|
+
run: (args) =>
|
|
42
|
+
args.operation === "propose"
|
|
43
|
+
? proposeCreativeContextSuggestion({
|
|
44
|
+
...args,
|
|
45
|
+
kind: "layout-template",
|
|
46
|
+
})
|
|
47
|
+
: applyLayoutTemplateSuggestion({
|
|
48
|
+
suggestionId: args.suggestionId,
|
|
49
|
+
operation: args.operation,
|
|
50
|
+
}),
|
|
51
|
+
});
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { beforeEach, describe, expect, it, vi } from "vitest";
|
|
2
|
+
|
|
3
|
+
const mocks = vi.hoisted(() => ({
|
|
4
|
+
getContextSource: vi.fn(),
|
|
5
|
+
inventory: vi.fn(),
|
|
6
|
+
}));
|
|
7
|
+
|
|
8
|
+
vi.mock("../store/index.js", () => ({
|
|
9
|
+
getContextSource: mocks.getContextSource,
|
|
10
|
+
}));
|
|
11
|
+
|
|
12
|
+
vi.mock("../server/context.js", () => ({
|
|
13
|
+
getCreativeContext: vi.fn(() => ({
|
|
14
|
+
connectors: { get: () => ({ inventory: mocks.inventory }) },
|
|
15
|
+
connectorContext: {},
|
|
16
|
+
})),
|
|
17
|
+
}));
|
|
18
|
+
|
|
19
|
+
import action from "./preview-context-import.js";
|
|
20
|
+
|
|
21
|
+
describe("preview-context-import public boundary", () => {
|
|
22
|
+
beforeEach(() => {
|
|
23
|
+
vi.clearAllMocks();
|
|
24
|
+
mocks.getContextSource.mockResolvedValue({
|
|
25
|
+
id: "source-1",
|
|
26
|
+
kind: "upload",
|
|
27
|
+
config: {},
|
|
28
|
+
connectionId: null,
|
|
29
|
+
ownerEmail: "alice@example.test",
|
|
30
|
+
});
|
|
31
|
+
mocks.inventory.mockResolvedValue({
|
|
32
|
+
items: [
|
|
33
|
+
{
|
|
34
|
+
externalId: "upload-1",
|
|
35
|
+
kind: "uploaded-document",
|
|
36
|
+
title: "Launch deck",
|
|
37
|
+
metadata: {
|
|
38
|
+
entryIndex: 0,
|
|
39
|
+
storageKey: "creative-context-blob:v1:private-value",
|
|
40
|
+
warning:
|
|
41
|
+
"Fetched https://provider.example/private?token=secret-value",
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
],
|
|
45
|
+
nextCursor: null,
|
|
46
|
+
complete: true,
|
|
47
|
+
coverage: { inspected: 1, returned: 1, truncated: false },
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
it("does not expose upload handles or substring capability URLs", async () => {
|
|
52
|
+
const result = (await action.run({
|
|
53
|
+
sourceId: "source-1",
|
|
54
|
+
limit: 50,
|
|
55
|
+
})) as any;
|
|
56
|
+
|
|
57
|
+
expect(result.items[0].metadata).toEqual({
|
|
58
|
+
entryIndex: 0,
|
|
59
|
+
warning: "Fetched [redacted]",
|
|
60
|
+
});
|
|
61
|
+
expect(JSON.stringify(result)).not.toContain("creative-context-blob");
|
|
62
|
+
expect(JSON.stringify(result)).not.toContain("secret-value");
|
|
63
|
+
});
|
|
64
|
+
});
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { defineAction } from "@agent-native/core/action";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
|
|
4
|
+
import { stringArray } from "../connectors/provider-response.js";
|
|
5
|
+
import { smartDefaultExternalIds } from "../connectors/smart-defaults.js";
|
|
6
|
+
import { getCreativeContext } from "../server/context.js";
|
|
7
|
+
import { sanitizePublicMetadata } from "../server/public-serialization.js";
|
|
8
|
+
import { getContextSource } from "../store/index.js";
|
|
9
|
+
|
|
10
|
+
export default defineAction({
|
|
11
|
+
description:
|
|
12
|
+
"Preview source inventory metadata without fetching or returning item content.",
|
|
13
|
+
schema: z.object({
|
|
14
|
+
sourceId: z.string().min(1),
|
|
15
|
+
limit: z.coerce.number().int().min(1).max(100).default(50),
|
|
16
|
+
cursor: z.string().optional(),
|
|
17
|
+
}),
|
|
18
|
+
http: { method: "GET" },
|
|
19
|
+
readOnly: true,
|
|
20
|
+
run: async (args) => {
|
|
21
|
+
const source = await getContextSource(args.sourceId);
|
|
22
|
+
if (!source) throw new Error("Context source not found or not accessible");
|
|
23
|
+
const { connectors, connectorContext } = getCreativeContext();
|
|
24
|
+
const page = await connectors.get(source.kind).inventory(
|
|
25
|
+
{
|
|
26
|
+
sourceId: source.id,
|
|
27
|
+
config: {
|
|
28
|
+
...source.config,
|
|
29
|
+
...(source.connectionId ? { connectionId: source.connectionId } : {}),
|
|
30
|
+
},
|
|
31
|
+
cursor: args.cursor ?? null,
|
|
32
|
+
limit: args.limit,
|
|
33
|
+
},
|
|
34
|
+
{ ...connectorContext, ownerEmail: source.ownerEmail },
|
|
35
|
+
);
|
|
36
|
+
const items = page.items.map((item) => ({
|
|
37
|
+
externalId: item.externalId,
|
|
38
|
+
kind: item.kind,
|
|
39
|
+
title: item.title,
|
|
40
|
+
canonicalUrl: item.canonicalUrl,
|
|
41
|
+
mimeType: item.mimeType,
|
|
42
|
+
sourceModifiedAt: item.sourceModifiedAt,
|
|
43
|
+
sizeBytes: item.sizeBytes,
|
|
44
|
+
metadata: sanitizePublicMetadata(item.metadata),
|
|
45
|
+
upstreamAccess: item.upstreamAccess,
|
|
46
|
+
}));
|
|
47
|
+
return {
|
|
48
|
+
sourceId: source.id,
|
|
49
|
+
items,
|
|
50
|
+
smartDefaultExternalIds: smartDefaultExternalIds({
|
|
51
|
+
kind: source.kind,
|
|
52
|
+
items: page.items,
|
|
53
|
+
canonicalExternalIds: stringArray(source.config.canonicalExternalIds),
|
|
54
|
+
pinnedExternalIds: stringArray(source.config.pinnedExternalIds),
|
|
55
|
+
now: connectorContext.now?.() ?? new Date(),
|
|
56
|
+
}),
|
|
57
|
+
nextCursor: page.nextCursor ?? undefined,
|
|
58
|
+
total: page.complete ? page.coverage.inspected : undefined,
|
|
59
|
+
};
|
|
60
|
+
},
|
|
61
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { defineAction } from "@agent-native/core/action";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
getJob,
|
|
6
|
+
purgeContextSourceArtifacts,
|
|
7
|
+
updateJob,
|
|
8
|
+
} from "../store/index.js";
|
|
9
|
+
|
|
10
|
+
export default defineAction({
|
|
11
|
+
description:
|
|
12
|
+
"Process an already-approved source purge job: remove private blobs, derived search indexes, corpus children, and deprecate promoted derivatives.",
|
|
13
|
+
schema: z.object({ jobId: z.string().min(1) }),
|
|
14
|
+
run: async ({ jobId }) => {
|
|
15
|
+
const job = await getJob(jobId);
|
|
16
|
+
if (!job || job.kind !== "purge" || !job.sourceId) {
|
|
17
|
+
throw new Error("Pending creative-context purge job not found");
|
|
18
|
+
}
|
|
19
|
+
const result = await purgeContextSourceArtifacts(job.sourceId);
|
|
20
|
+
return {
|
|
21
|
+
job: await updateJob(job.id, { status: "completed", result }),
|
|
22
|
+
result,
|
|
23
|
+
};
|
|
24
|
+
},
|
|
25
|
+
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { defineAction } from "@agent-native/core/action";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
|
|
4
|
+
import { saveBrandDnaCandidate } from "../store/index.js";
|
|
5
|
+
|
|
6
|
+
const dna = z
|
|
7
|
+
.object({ summary: z.string().trim().min(1).max(20_000) })
|
|
8
|
+
.catchall(z.unknown());
|
|
9
|
+
|
|
10
|
+
export default defineAction({
|
|
11
|
+
description:
|
|
12
|
+
"Save an inferred immutable brand DNA proposal pinned to exact evidence without overwriting published context.",
|
|
13
|
+
schema: z.object({
|
|
14
|
+
profileId: z.string().min(1).optional(),
|
|
15
|
+
name: z.string().trim().min(1).max(200).optional(),
|
|
16
|
+
description: z.string().max(5000).nullable().optional(),
|
|
17
|
+
dna,
|
|
18
|
+
evidenceItemIds: z.array(z.string().min(1)).max(500).optional(),
|
|
19
|
+
}),
|
|
20
|
+
publicAgent: { expose: true, readOnly: false, requiresAuth: true },
|
|
21
|
+
run: (args) => saveBrandDnaCandidate({ ...args, status: "proposed" }),
|
|
22
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { defineAction } from "@agent-native/core/action";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
|
|
4
|
+
import { proposeCreativeContextSuggestion } from "../store/index.js";
|
|
5
|
+
|
|
6
|
+
export default defineAction({
|
|
7
|
+
description:
|
|
8
|
+
"Propose an exact versioned creative-context item as the canonical logo for review.",
|
|
9
|
+
schema: z.object({
|
|
10
|
+
profileId: z.string().min(1).optional(),
|
|
11
|
+
itemId: z.string().min(1),
|
|
12
|
+
itemVersionId: z.string().min(1).optional(),
|
|
13
|
+
reason: z.string().max(5000).optional(),
|
|
14
|
+
payload: z.record(z.string(), z.unknown()).optional(),
|
|
15
|
+
}),
|
|
16
|
+
publicAgent: { expose: true, readOnly: false, requiresAuth: true },
|
|
17
|
+
run: (args) =>
|
|
18
|
+
proposeCreativeContextSuggestion({ ...args, kind: "canonical-logo" }),
|
|
19
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { defineAction } from "@agent-native/core/action";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
|
|
4
|
+
import { publishBrandDna } from "../store/index.js";
|
|
5
|
+
|
|
6
|
+
export default defineAction({
|
|
7
|
+
description:
|
|
8
|
+
"Publish an immutable brand DNA version pinned to exact evidence item versions and refresh transparent brand context.",
|
|
9
|
+
schema: z.object({
|
|
10
|
+
profileId: z.string().min(1),
|
|
11
|
+
proposalVersionId: z.string().min(1),
|
|
12
|
+
confirmation: z.object({
|
|
13
|
+
proposalVersionId: z.string().min(1),
|
|
14
|
+
contentHash: z.string().length(64),
|
|
15
|
+
}),
|
|
16
|
+
}),
|
|
17
|
+
needsApproval: true,
|
|
18
|
+
publicAgent: {
|
|
19
|
+
expose: true,
|
|
20
|
+
readOnly: false,
|
|
21
|
+
requiresAuth: true,
|
|
22
|
+
isConsequential: true,
|
|
23
|
+
},
|
|
24
|
+
run: publishBrandDna,
|
|
25
|
+
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { defineAction } from "@agent-native/core/action";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
|
|
4
|
+
import { recommendContextRoots } from "../connectors/recommendations.js";
|
|
5
|
+
import { getCreativeContext } from "../server/context.js";
|
|
6
|
+
|
|
7
|
+
export default defineAction({
|
|
8
|
+
description:
|
|
9
|
+
"Return read-only provider-backed source recommendations for confirmation. Recommendations are never an import boundary and are not persisted.",
|
|
10
|
+
schema: z.object({
|
|
11
|
+
provider: z.enum(["notion", "google-slides", "figma"]),
|
|
12
|
+
connectionId: z.string().min(1).optional(),
|
|
13
|
+
limit: z.coerce.number().int().min(1).max(50).default(15),
|
|
14
|
+
figmaProjectId: z.string().min(1).optional(),
|
|
15
|
+
figmaTeamId: z.string().min(1).optional(),
|
|
16
|
+
}),
|
|
17
|
+
http: { method: "GET" },
|
|
18
|
+
readOnly: true,
|
|
19
|
+
publicAgent: { expose: true, readOnly: true, requiresAuth: true },
|
|
20
|
+
run: async (args) => {
|
|
21
|
+
const { connectorContext } = getCreativeContext();
|
|
22
|
+
return recommendContextRoots(args, connectorContext);
|
|
23
|
+
},
|
|
24
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { defineAction } from "@agent-native/core/action";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
|
|
4
|
+
import { recordContextFeedback } from "../store/index.js";
|
|
5
|
+
|
|
6
|
+
export default defineAction({
|
|
7
|
+
description:
|
|
8
|
+
"Record a usefulness, correctness, or freshness signal against an exact context item version.",
|
|
9
|
+
schema: z.object({
|
|
10
|
+
itemId: z.string().min(1),
|
|
11
|
+
itemVersionId: z.string().min(1).optional(),
|
|
12
|
+
signal: z.enum(["helpful", "not-helpful", "incorrect", "outdated"]),
|
|
13
|
+
note: z.string().max(5000).optional(),
|
|
14
|
+
}),
|
|
15
|
+
run: recordContextFeedback,
|
|
16
|
+
});
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { defineAction } from "@agent-native/core/action";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
|
|
4
|
+
import { serializePublicReviewItems } from "../server/public-serialization.js";
|
|
5
|
+
import { reviewContextItems } from "../store/index.js";
|
|
6
|
+
|
|
7
|
+
const schema = z.discriminatedUnion("operation", [
|
|
8
|
+
z.object({
|
|
9
|
+
sourceId: z.string().min(1),
|
|
10
|
+
operation: z.literal("list"),
|
|
11
|
+
queue: z.enum(["restricted", "all"]).default("restricted"),
|
|
12
|
+
limit: z.coerce.number().int().min(1).max(500).default(100),
|
|
13
|
+
}),
|
|
14
|
+
z.object({
|
|
15
|
+
sourceId: z.string().min(1),
|
|
16
|
+
operation: z.enum([
|
|
17
|
+
"approve",
|
|
18
|
+
"exclude",
|
|
19
|
+
"exemplar",
|
|
20
|
+
"normal",
|
|
21
|
+
"ignore",
|
|
22
|
+
"star",
|
|
23
|
+
"unstar",
|
|
24
|
+
"deprecate",
|
|
25
|
+
"restore",
|
|
26
|
+
]),
|
|
27
|
+
itemIds: z.array(z.string().min(1)).min(1).max(500),
|
|
28
|
+
}),
|
|
29
|
+
]);
|
|
30
|
+
|
|
31
|
+
const agentInputSchema = z.object({
|
|
32
|
+
sourceId: z.string().min(1),
|
|
33
|
+
operation: z.enum([
|
|
34
|
+
"list",
|
|
35
|
+
"approve",
|
|
36
|
+
"exclude",
|
|
37
|
+
"exemplar",
|
|
38
|
+
"normal",
|
|
39
|
+
"ignore",
|
|
40
|
+
"star",
|
|
41
|
+
"unstar",
|
|
42
|
+
"deprecate",
|
|
43
|
+
"restore",
|
|
44
|
+
]),
|
|
45
|
+
queue: z.enum(["restricted", "all"]).optional(),
|
|
46
|
+
limit: z.coerce.number().int().min(1).max(500).optional(),
|
|
47
|
+
itemIds: z.array(z.string().min(1)).min(1).max(500).optional(),
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
export default defineAction({
|
|
51
|
+
description:
|
|
52
|
+
"List pending restricted metadata without content, or approve/exclude selected items after user confirmation.",
|
|
53
|
+
schema,
|
|
54
|
+
agentInputSchema,
|
|
55
|
+
needsApproval: (args) => args.operation !== "list",
|
|
56
|
+
publicAgent: {
|
|
57
|
+
expose: true,
|
|
58
|
+
readOnly: false,
|
|
59
|
+
requiresAuth: true,
|
|
60
|
+
isConsequential: true,
|
|
61
|
+
},
|
|
62
|
+
run: async (input) => {
|
|
63
|
+
const result = await reviewContextItems(input);
|
|
64
|
+
return {
|
|
65
|
+
...result,
|
|
66
|
+
items: serializePublicReviewItems(result.items),
|
|
67
|
+
};
|
|
68
|
+
},
|
|
69
|
+
});
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { defineAction } from "@agent-native/core/action";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
|
|
4
|
+
import { availableEmbeddingFamilies } from "../embeddings/providers.js";
|
|
5
|
+
import {
|
|
6
|
+
bakeOffEmbeddingFamilies,
|
|
7
|
+
CREATIVE_CONTEXT_GOLD_DOCUMENTS,
|
|
8
|
+
CREATIVE_CONTEXT_GOLD_TASKS,
|
|
9
|
+
embeddingBakeoffPasses,
|
|
10
|
+
} from "../eval/index.js";
|
|
11
|
+
import { createEmbeddingSet } from "../store/index.js";
|
|
12
|
+
|
|
13
|
+
export default defineAction({
|
|
14
|
+
description:
|
|
15
|
+
"Run the checked-in retrieval bake-off across configured embedding families and persist the winning family/model/version/dimensions as the active corpus choice.",
|
|
16
|
+
schema: z.object({ confirmProviderCosts: z.literal(true) }),
|
|
17
|
+
needsApproval: true,
|
|
18
|
+
publicAgent: {
|
|
19
|
+
expose: true,
|
|
20
|
+
readOnly: false,
|
|
21
|
+
requiresAuth: true,
|
|
22
|
+
isConsequential: true,
|
|
23
|
+
},
|
|
24
|
+
run: async () => {
|
|
25
|
+
const families = await availableEmbeddingFamilies();
|
|
26
|
+
if (!families.length) {
|
|
27
|
+
throw new Error(
|
|
28
|
+
"Configure at least one GEMINI_API_KEY, COHERE_API_KEY, or VOYAGE_API_KEY before running the embedding bake-off.",
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
const results = await bakeOffEmbeddingFamilies({
|
|
32
|
+
families,
|
|
33
|
+
documents: Object.fromEntries(
|
|
34
|
+
CREATIVE_CONTEXT_GOLD_DOCUMENTS.map((document) => [
|
|
35
|
+
document.key,
|
|
36
|
+
{
|
|
37
|
+
text: `${document.title}\n${document.text}`,
|
|
38
|
+
...(document.imageBase64
|
|
39
|
+
? {
|
|
40
|
+
images: [
|
|
41
|
+
{
|
|
42
|
+
mimeType: "image/png" as const,
|
|
43
|
+
base64: document.imageBase64,
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
|
+
}
|
|
47
|
+
: {}),
|
|
48
|
+
},
|
|
49
|
+
]),
|
|
50
|
+
),
|
|
51
|
+
tasks: CREATIVE_CONTEXT_GOLD_TASKS,
|
|
52
|
+
allowedDocumentKeys: CREATIVE_CONTEXT_GOLD_DOCUMENTS.filter(
|
|
53
|
+
(document) =>
|
|
54
|
+
document.owner !== "other-organization" &&
|
|
55
|
+
document.status === "active",
|
|
56
|
+
).map((document) => document.key),
|
|
57
|
+
});
|
|
58
|
+
const winner = results.find((result) =>
|
|
59
|
+
embeddingBakeoffPasses(result.metrics),
|
|
60
|
+
);
|
|
61
|
+
if (!winner) {
|
|
62
|
+
throw new Error(
|
|
63
|
+
"No embedding family passed the hard multimodal retrieval and zero-leak thresholds; no active winner was persisted.",
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
const set = await createEmbeddingSet({
|
|
67
|
+
name: `Creative context ${winner.family.provider} bake-off winner`,
|
|
68
|
+
provider: winner.family.provider,
|
|
69
|
+
family: winner.family.id,
|
|
70
|
+
model: winner.family.model,
|
|
71
|
+
version: winner.family.version,
|
|
72
|
+
dimensions: winner.family.dimensions,
|
|
73
|
+
metadata: {
|
|
74
|
+
metrics: winner.metrics,
|
|
75
|
+
evaluatedAt: new Date().toISOString(),
|
|
76
|
+
},
|
|
77
|
+
});
|
|
78
|
+
return {
|
|
79
|
+
winner: set,
|
|
80
|
+
results: results.map((result) => ({
|
|
81
|
+
family: result.family.id,
|
|
82
|
+
provider: result.family.provider,
|
|
83
|
+
model: result.family.model,
|
|
84
|
+
version: result.family.version,
|
|
85
|
+
dimensions: result.family.dimensions,
|
|
86
|
+
metrics: result.metrics,
|
|
87
|
+
})),
|
|
88
|
+
};
|
|
89
|
+
},
|
|
90
|
+
});
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { defineAction } from "@agent-native/core/action";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
|
|
4
|
+
import { performCreativeContextSearch } from "../server/retrieval.js";
|
|
5
|
+
|
|
6
|
+
const schema = z
|
|
7
|
+
.object({
|
|
8
|
+
query: z.string().trim().min(1).max(1000).optional(),
|
|
9
|
+
imageBlobRef: z.string().min(1).max(20_000).optional(),
|
|
10
|
+
mediaId: z.string().min(1).optional(),
|
|
11
|
+
sourceIds: z.array(z.string().min(1)).max(100).optional(),
|
|
12
|
+
packId: z.string().min(1).optional(),
|
|
13
|
+
kinds: z.array(z.string().min(1)).max(50).optional(),
|
|
14
|
+
tags: z.array(z.string().min(1)).max(100).optional(),
|
|
15
|
+
colors: z.array(z.string().min(1)).max(100).optional(),
|
|
16
|
+
updatedAfter: z.iso.datetime().optional(),
|
|
17
|
+
updatedBefore: z.iso.datetime().optional(),
|
|
18
|
+
statuses: z
|
|
19
|
+
.array(z.enum(["active", "deprecated"]))
|
|
20
|
+
.max(2)
|
|
21
|
+
.optional(),
|
|
22
|
+
matchMode: z
|
|
23
|
+
.enum(["allTerms", "anyTerm", "phrase", "regex"])
|
|
24
|
+
.default("allTerms"),
|
|
25
|
+
limit: z.coerce.number().int().min(1).max(100).default(20),
|
|
26
|
+
cursor: z.string().optional(),
|
|
27
|
+
maxPerSource: z.coerce.number().int().min(1).max(20).default(5),
|
|
28
|
+
snapshot: z.boolean().default(true),
|
|
29
|
+
contextPackName: z.string().trim().min(1).max(200).optional(),
|
|
30
|
+
})
|
|
31
|
+
.refine(
|
|
32
|
+
(value) => Boolean(value.query || value.imageBlobRef || value.mediaId),
|
|
33
|
+
{
|
|
34
|
+
message: "Provide query, imageBlobRef, or mediaId",
|
|
35
|
+
},
|
|
36
|
+
)
|
|
37
|
+
.refine((value) => !(value.imageBlobRef && value.mediaId), {
|
|
38
|
+
message: "Provide imageBlobRef or mediaId, not both",
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
export default defineAction({
|
|
42
|
+
description:
|
|
43
|
+
"Search accessible curated creative context through portable lexical, Postgres FTS, and same-database pgvector lanes; fuse and diversify results, collapse revisions, and snapshot exact evidence by default.",
|
|
44
|
+
schema,
|
|
45
|
+
publicAgent: { expose: true, readOnly: false, requiresAuth: true },
|
|
46
|
+
run: performCreativeContextSearch,
|
|
47
|
+
});
|