@mindstudio-ai/remy 0.1.214 → 0.1.215
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/dist/headless.js +21 -0
- package/dist/index.js +22 -0
- package/package.json +1 -1
package/dist/headless.js
CHANGED
|
@@ -393,6 +393,9 @@ async function initOrgContext(config) {
|
|
|
393
393
|
log3.debug("org context init failed", { error: err.message });
|
|
394
394
|
}
|
|
395
395
|
}
|
|
396
|
+
function getOrgContext() {
|
|
397
|
+
return cached;
|
|
398
|
+
}
|
|
396
399
|
function renderOrgContextBlock() {
|
|
397
400
|
const ctx = cached;
|
|
398
401
|
const auth = ctx?.auth;
|
|
@@ -4957,6 +4960,16 @@ var PROMPT_TEMPLATE = readAsset(SUBAGENT, "prompt.md").replace(/\{\{([^}]+)\}\}/
|
|
|
4957
4960
|
const k = key.trim();
|
|
4958
4961
|
return RUNTIME_PLACEHOLDERS.has(k) ? match : readAsset(SUBAGENT, k);
|
|
4959
4962
|
}).replace(/\n{3,}/g, "\n\n");
|
|
4963
|
+
function renderDesignSystemBlock(designSystem) {
|
|
4964
|
+
if (!designSystem) {
|
|
4965
|
+
return "";
|
|
4966
|
+
}
|
|
4967
|
+
return [
|
|
4968
|
+
"<design_system>",
|
|
4969
|
+
`The organization that owns this app publishes a design system at ${designSystem}. Treat it as the primary reference for this app's foundational visual language \u2014 palette, type, spacing, and the core component patterns that should feel consistent with the org's other products. Consult it for foundational decisions and fetch it with scrapeWebUrl when you need specifics (it's usually a hosted doc such as an llms.txt). It's a resource to orient toward, not a rulebook: you don't need to ground every detail in it, and app-specific or expressive choices are still yours to make.`,
|
|
4970
|
+
"</design_system>"
|
|
4971
|
+
].join("\n");
|
|
4972
|
+
}
|
|
4960
4973
|
function getDesignExpertPrompt(onboardingState) {
|
|
4961
4974
|
const specContext = loadSpecIndex();
|
|
4962
4975
|
const indices = getSampleIndices(
|
|
@@ -4986,6 +4999,14 @@ function getDesignExpertPrompt(onboardingState) {
|
|
|
4986
4999
|
prompt += `
|
|
4987
5000
|
|
|
4988
5001
|
${specContext}`;
|
|
5002
|
+
}
|
|
5003
|
+
const designSystemBlock = renderDesignSystemBlock(
|
|
5004
|
+
getOrgContext()?.designSystem
|
|
5005
|
+
);
|
|
5006
|
+
if (designSystemBlock) {
|
|
5007
|
+
prompt += `
|
|
5008
|
+
|
|
5009
|
+
${designSystemBlock}`;
|
|
4989
5010
|
}
|
|
4990
5011
|
const state = onboardingState ?? "onboardingFinished";
|
|
4991
5012
|
if (state !== "onboardingFinished") {
|
package/dist/index.js
CHANGED
|
@@ -1956,6 +1956,9 @@ async function initOrgContext(config) {
|
|
|
1956
1956
|
log3.debug("org context init failed", { error: err.message });
|
|
1957
1957
|
}
|
|
1958
1958
|
}
|
|
1959
|
+
function getOrgContext() {
|
|
1960
|
+
return cached;
|
|
1961
|
+
}
|
|
1959
1962
|
function renderOrgContextBlock() {
|
|
1960
1963
|
const ctx = cached;
|
|
1961
1964
|
const auth = ctx?.auth;
|
|
@@ -5797,6 +5800,16 @@ var init_getUiInspirationSample = __esm({
|
|
|
5797
5800
|
});
|
|
5798
5801
|
|
|
5799
5802
|
// src/subagents/designExpert/prompt.ts
|
|
5803
|
+
function renderDesignSystemBlock(designSystem) {
|
|
5804
|
+
if (!designSystem) {
|
|
5805
|
+
return "";
|
|
5806
|
+
}
|
|
5807
|
+
return [
|
|
5808
|
+
"<design_system>",
|
|
5809
|
+
`The organization that owns this app publishes a design system at ${designSystem}. Treat it as the primary reference for this app's foundational visual language \u2014 palette, type, spacing, and the core component patterns that should feel consistent with the org's other products. Consult it for foundational decisions and fetch it with scrapeWebUrl when you need specifics (it's usually a hosted doc such as an llms.txt). It's a resource to orient toward, not a rulebook: you don't need to ground every detail in it, and app-specific or expressive choices are still yours to make.`,
|
|
5810
|
+
"</design_system>"
|
|
5811
|
+
].join("\n");
|
|
5812
|
+
}
|
|
5800
5813
|
function getDesignExpertPrompt(onboardingState) {
|
|
5801
5814
|
const specContext = loadSpecIndex();
|
|
5802
5815
|
const indices = getSampleIndices(
|
|
@@ -5826,6 +5839,14 @@ function getDesignExpertPrompt(onboardingState) {
|
|
|
5826
5839
|
prompt += `
|
|
5827
5840
|
|
|
5828
5841
|
${specContext}`;
|
|
5842
|
+
}
|
|
5843
|
+
const designSystemBlock = renderDesignSystemBlock(
|
|
5844
|
+
getOrgContext()?.designSystem
|
|
5845
|
+
);
|
|
5846
|
+
if (designSystemBlock) {
|
|
5847
|
+
prompt += `
|
|
5848
|
+
|
|
5849
|
+
${designSystemBlock}`;
|
|
5829
5850
|
}
|
|
5830
5851
|
const state = onboardingState ?? "onboardingFinished";
|
|
5831
5852
|
if (state !== "onboardingFinished") {
|
|
@@ -5843,6 +5864,7 @@ var init_prompt3 = __esm({
|
|
|
5843
5864
|
"use strict";
|
|
5844
5865
|
init_assets();
|
|
5845
5866
|
init_context();
|
|
5867
|
+
init_orgContext();
|
|
5846
5868
|
init_sampleCache();
|
|
5847
5869
|
init_getFontLibrarySample();
|
|
5848
5870
|
init_getDesignReferencesSample();
|