@promptbook/components 0.114.0-41 → 0.114.0-47
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/esm/index.es.js +43 -9
- package/esm/index.es.js.map +1 -1
- package/esm/src/book-2.0/agent-source/CreateAgentModelRequirementsOptions.d.ts +2 -0
- package/esm/src/cli/cli-commands/coder/add.d.ts +16 -0
- package/esm/src/cli/cli-commands/coder/agentCliOptions.d.ts +3 -2
- package/esm/src/cli/cli-commands/coder/augmentCoderAgentTeam.d.ts +7 -0
- package/esm/src/cli/cli-commands/coder/coderAgentRole.d.ts +16 -0
- package/esm/src/cli/cli-commands/coder/coderReferencedArtifacts.d.ts +8 -7
- package/esm/src/cli/cli-commands/coder/ensureCoderDefaultAgentFiles.d.ts +8 -0
- package/esm/src/cli/cli-commands/coder/ensureCoderDefaultAgentFiles.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/coder/ensureCoderRoleAgentFile.d.ts +12 -0
- package/esm/src/cli/cli-commands/coder/generate-boilerplates.d.ts +1 -1
- package/esm/src/cli/cli-commands/coder/getCoderInitializationCommitPaths.d.ts +9 -0
- package/esm/src/cli/cli-commands/coder/initializeCoderProjectConfiguration.d.ts +7 -5
- package/esm/src/cli/cli-commands/coder/plan.d.ts +7 -0
- package/esm/src/cli/cli-commands/coder/planning/assertPlanningCommitSafe.d.ts +6 -0
- package/esm/src/cli/cli-commands/coder/planning/assertPlanningPrdCommitScope.d.ts +7 -0
- package/esm/src/cli/cli-commands/coder/planning/assertPlanningRuntimePath.d.ts +6 -0
- package/esm/src/cli/cli-commands/coder/planning/createPlanningTerminal.d.ts +8 -0
- package/esm/src/cli/cli-commands/coder/planning/createPlanningTerminal.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/coder/planning/createPlanningWorkspace.d.ts +11 -0
- package/esm/src/cli/cli-commands/coder/planning/discussPlanningTurn.d.ts +15 -0
- package/esm/src/cli/cli-commands/coder/planning/fixtures/snapshotPlanningProject.d.ts +5 -0
- package/esm/src/cli/cli-commands/coder/planning/planningGitSync.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/coder/planning/planningPackagedCli.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/coder/planning/planningProtocol.d.ts +152 -0
- package/esm/src/cli/cli-commands/coder/planning/planningTeam.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/coder/planning/preparePlanningChanges.d.ts +16 -0
- package/esm/src/cli/cli-commands/coder/planning/readPlanningContext.d.ts +6 -0
- package/esm/src/cli/cli-commands/coder/planning/resolvePlanningPath.d.ts +7 -0
- package/esm/src/cli/cli-commands/coder/planning/runPlanningHarness.d.ts +30 -0
- package/esm/src/cli/cli-commands/coder/planning/runPlanningHarness.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/coder/planning/runPlanningSession.d.ts +21 -0
- package/esm/src/cli/cli-commands/coder/planning/runPlanningSession.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/coder/planning/savePlanningChanges.d.ts +7 -0
- package/esm/src/cli/cli-commands/coder/printInitializationSummary.d.ts +2 -1
- package/esm/src/cli/cli-commands/coder/promptsReadmeTemplate.d.ts +13 -0
- package/esm/src/cli/cli-commands/coder/promptsReadmeTemplate.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/coder/readCoderAgentBook.d.ts +8 -0
- package/esm/src/cli/cli-commands/coder/workspacePreflight.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/coder.d.ts +1 -0
- package/esm/src/cli/cli-commands/common/LocalAgentBookCollection.d.ts +4 -2
- package/esm/src/cli/cli-commands/common/coderGitSyncCliOptions.d.ts +1 -1
- package/esm/src/cli/cli-commands/common/resolveLocalAgentSource.d.ts +8 -1
- package/esm/src/cli/cli-commands/common/validateCoderRunOptions.d.ts +6 -0
- package/esm/src/cli/cli-commands/common/workspaceRepository.d.ts +36 -0
- package/esm/src/cli/cli-commands/common/workspaceRepository.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/common/workspaceRepositoryCliOptions.d.ts +11 -0
- package/esm/src/commitments/TEAM/TEAM.test.d.ts +1 -0
- package/esm/src/conversion/archive/loadJsZipModule.d.ts +10 -0
- package/esm/src/version.d.ts +1 -1
- package/package.json +1 -1
- package/umd/index.umd.js +43 -9
- package/umd/index.umd.js.map +1 -1
- package/umd/src/book-2.0/agent-source/CreateAgentModelRequirementsOptions.d.ts +2 -0
- package/umd/src/cli/cli-commands/coder/add.d.ts +16 -0
- package/umd/src/cli/cli-commands/coder/agentCliOptions.d.ts +3 -2
- package/umd/src/cli/cli-commands/coder/augmentCoderAgentTeam.d.ts +7 -0
- package/umd/src/cli/cli-commands/coder/coderAgentRole.d.ts +16 -0
- package/umd/src/cli/cli-commands/coder/coderReferencedArtifacts.d.ts +8 -7
- package/umd/src/cli/cli-commands/coder/ensureCoderDefaultAgentFiles.d.ts +8 -0
- package/umd/src/cli/cli-commands/coder/ensureCoderDefaultAgentFiles.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/coder/ensureCoderRoleAgentFile.d.ts +12 -0
- package/umd/src/cli/cli-commands/coder/generate-boilerplates.d.ts +1 -1
- package/umd/src/cli/cli-commands/coder/getCoderInitializationCommitPaths.d.ts +9 -0
- package/umd/src/cli/cli-commands/coder/initializeCoderProjectConfiguration.d.ts +7 -5
- package/umd/src/cli/cli-commands/coder/plan.d.ts +7 -0
- package/umd/src/cli/cli-commands/coder/planning/assertPlanningCommitSafe.d.ts +6 -0
- package/umd/src/cli/cli-commands/coder/planning/assertPlanningPrdCommitScope.d.ts +7 -0
- package/umd/src/cli/cli-commands/coder/planning/assertPlanningRuntimePath.d.ts +6 -0
- package/umd/src/cli/cli-commands/coder/planning/createPlanningTerminal.d.ts +8 -0
- package/umd/src/cli/cli-commands/coder/planning/createPlanningTerminal.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/coder/planning/createPlanningWorkspace.d.ts +11 -0
- package/umd/src/cli/cli-commands/coder/planning/discussPlanningTurn.d.ts +15 -0
- package/umd/src/cli/cli-commands/coder/planning/fixtures/snapshotPlanningProject.d.ts +5 -0
- package/umd/src/cli/cli-commands/coder/planning/planningGitSync.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/coder/planning/planningPackagedCli.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/coder/planning/planningProtocol.d.ts +152 -0
- package/umd/src/cli/cli-commands/coder/planning/planningTeam.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/coder/planning/preparePlanningChanges.d.ts +16 -0
- package/umd/src/cli/cli-commands/coder/planning/readPlanningContext.d.ts +6 -0
- package/umd/src/cli/cli-commands/coder/planning/resolvePlanningPath.d.ts +7 -0
- package/umd/src/cli/cli-commands/coder/planning/runPlanningHarness.d.ts +30 -0
- package/umd/src/cli/cli-commands/coder/planning/runPlanningHarness.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/coder/planning/runPlanningSession.d.ts +21 -0
- package/umd/src/cli/cli-commands/coder/planning/runPlanningSession.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/coder/planning/savePlanningChanges.d.ts +7 -0
- package/umd/src/cli/cli-commands/coder/printInitializationSummary.d.ts +2 -1
- package/umd/src/cli/cli-commands/coder/promptsReadmeTemplate.d.ts +13 -0
- package/umd/src/cli/cli-commands/coder/promptsReadmeTemplate.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/coder/readCoderAgentBook.d.ts +8 -0
- package/umd/src/cli/cli-commands/coder/workspacePreflight.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/coder.d.ts +1 -0
- package/umd/src/cli/cli-commands/common/LocalAgentBookCollection.d.ts +4 -2
- package/umd/src/cli/cli-commands/common/coderGitSyncCliOptions.d.ts +1 -1
- package/umd/src/cli/cli-commands/common/resolveLocalAgentSource.d.ts +8 -1
- package/umd/src/cli/cli-commands/common/validateCoderRunOptions.d.ts +6 -0
- package/umd/src/cli/cli-commands/common/workspaceRepository.d.ts +36 -0
- package/umd/src/cli/cli-commands/common/workspaceRepository.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/common/workspaceRepositoryCliOptions.d.ts +11 -0
- package/umd/src/commitments/TEAM/TEAM.test.d.ts +1 -0
- package/umd/src/conversion/archive/loadJsZipModule.d.ts +10 -0
- package/umd/src/version.d.ts +1 -1
package/esm/index.es.js
CHANGED
|
@@ -39,7 +39,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
|
|
|
39
39
|
* @generated
|
|
40
40
|
* @see https://github.com/webgptorg/promptbook
|
|
41
41
|
*/
|
|
42
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.114.0-
|
|
42
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.114.0-47';
|
|
43
43
|
/**
|
|
44
44
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
45
45
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -13823,6 +13823,18 @@ class TeamCommitmentDefinition extends BaseCommitmentDefinition {
|
|
|
13823
13823
|
|
|
13824
13824
|
Registers teammate agents that the current agent can consult via tools.
|
|
13825
13825
|
|
|
13826
|
+
The primary agent sends a question and relevant context to a teammate and receives an attributed answer.
|
|
13827
|
+
Each teammate uses its own Book. Declaring a team makes advisers available when relevant; it does not
|
|
13828
|
+
merge their rules into the primary agent or start every teammate automatically.
|
|
13829
|
+
|
|
13830
|
+
In \`ptbk coder run\` and \`ptbk coder plan\`, TEAM entries in the selected Book, its ancestors and imports
|
|
13831
|
+
use the existing reference rules: \`@Name\`, \`{Agent Name}\`, \`{./lawyer.book}\`, project paths such as
|
|
13832
|
+
\`{agents/lawyer.book}\`, and HTTP(S) Book URLs. Local advisers require no Agents Server. A remote Book
|
|
13833
|
+
must be readable through its normal endpoint; private or inaccessible sources return errors.
|
|
13834
|
+
Coding harnesses expose scoped command tools; planning uses restricted host tools and currently requires
|
|
13835
|
+
OpenAI Codex. Planning restrictions apply to every adviser, including custom Developer Books.
|
|
13836
|
+
The primary agent retains responsibility for the task, PRD proposals and final output.
|
|
13837
|
+
|
|
13826
13838
|
## Examples
|
|
13827
13839
|
|
|
13828
13840
|
\`\`\`book
|
|
@@ -13834,7 +13846,7 @@ class TeamCommitmentDefinition extends BaseCommitmentDefinition {
|
|
|
13834
13846
|
`);
|
|
13835
13847
|
}
|
|
13836
13848
|
applyToAgentModelRequirements(requirements, content) {
|
|
13837
|
-
var _a, _b, _c;
|
|
13849
|
+
var _a, _b, _c, _d;
|
|
13838
13850
|
const trimmedContent = content.trim();
|
|
13839
13851
|
if (!trimmedContent) {
|
|
13840
13852
|
return requirements;
|
|
@@ -13848,20 +13860,30 @@ class TeamCommitmentDefinition extends BaseCommitmentDefinition {
|
|
|
13848
13860
|
const existingTeammates = ((_b = requirements._metadata) === null || _b === void 0 ? void 0 : _b.teammates) || [];
|
|
13849
13861
|
const preResolvedProfiles = (((_c = requirements._metadata) === null || _c === void 0 ? void 0 : _c.preResolvedTeammateProfiles) || {});
|
|
13850
13862
|
const resolvedTeammates = resolveTeamTeammateLabels(trimmedContent, teammates);
|
|
13863
|
+
const toolUrls = new Map(existingTeammates.map((teammate) => [teammate.toolName, teammate.url]));
|
|
13851
13864
|
const teamEntries = resolvedTeammates.map((teammate) => {
|
|
13852
13865
|
const profile = preResolvedProfiles[teammate.url];
|
|
13853
13866
|
const resolvedLabel = (profile === null || profile === void 0 ? void 0 : profile.agentName) || teammate.label;
|
|
13854
13867
|
const existingTeammate = existingTeammates.find((entry) => entry.url === teammate.url);
|
|
13868
|
+
const baseToolName = (existingTeammate === null || existingTeammate === void 0 ? void 0 : existingTeammate.toolName) || createTeamToolName(teammate.url, resolvedLabel);
|
|
13869
|
+
let toolName = baseToolName;
|
|
13870
|
+
let suffix = 1;
|
|
13871
|
+
// Explicit paths can identify distinct Books with the same display name or normalized label.
|
|
13872
|
+
while (toolUrls.has(toolName) && toolUrls.get(toolName) !== teammate.url) {
|
|
13873
|
+
toolName = `${baseToolName}_${++suffix}`;
|
|
13874
|
+
}
|
|
13875
|
+
toolUrls.set(toolName, teammate.url);
|
|
13855
13876
|
return {
|
|
13856
|
-
toolName:
|
|
13857
|
-
createTeamToolName(teammate.url, resolvedLabel)),
|
|
13877
|
+
toolName: toolName,
|
|
13858
13878
|
teammate: { ...teammate, label: resolvedLabel },
|
|
13859
13879
|
agentName,
|
|
13860
13880
|
description: (profile === null || profile === void 0 ? void 0 : profile.personaDescription) || null,
|
|
13861
13881
|
};
|
|
13862
13882
|
});
|
|
13863
|
-
|
|
13864
|
-
|
|
13883
|
+
if (!((_d = requirements._metadata) === null || _d === void 0 ? void 0 : _d.isTeamToolRegistrationDisabled)) {
|
|
13884
|
+
for (const entry of teamEntries) {
|
|
13885
|
+
registerTeamTool(entry);
|
|
13886
|
+
}
|
|
13865
13887
|
}
|
|
13866
13888
|
const existingTools = requirements.tools || [];
|
|
13867
13889
|
const updatedTools = [...existingTools];
|
|
@@ -49818,9 +49840,15 @@ async function preResolveTeammateProfilesForTeamCommitment(requirements, commitm
|
|
|
49818
49840
|
if (preResolvedTeammateProfiles[teammate.url]) {
|
|
49819
49841
|
continue;
|
|
49820
49842
|
}
|
|
49821
|
-
|
|
49822
|
-
|
|
49823
|
-
|
|
49843
|
+
try {
|
|
49844
|
+
const profile = await profileResolver.resolveTeammateProfile(teammate.url);
|
|
49845
|
+
if (profile) {
|
|
49846
|
+
preResolvedTeammateProfiles[teammate.url] = profile;
|
|
49847
|
+
}
|
|
49848
|
+
}
|
|
49849
|
+
catch (error) {
|
|
49850
|
+
// One inaccessible adviser must not erase the names and roles of other callable teammates.
|
|
49851
|
+
console.warn(`Failed to resolve TEAM profile for ${teammate.url}:`, error);
|
|
49824
49852
|
}
|
|
49825
49853
|
}
|
|
49826
49854
|
return {
|
|
@@ -50767,6 +50795,12 @@ async function createAgentModelRequirementsWithCommitments(agentSource, modelNam
|
|
|
50767
50795
|
const parseResult = parseAgentSourceWithCommitments(agentSource);
|
|
50768
50796
|
const filteredCommitments = filterCommitmentsForAgentModelRequirements(parseResult.commitments);
|
|
50769
50797
|
let requirements = createInitialAgentModelRequirements(parseResult.agentName, modelName);
|
|
50798
|
+
if (options === null || options === void 0 ? void 0 : options.isTeamToolRegistrationDisabled) {
|
|
50799
|
+
requirements = {
|
|
50800
|
+
...requirements,
|
|
50801
|
+
_metadata: { ...requirements._metadata, isTeamToolRegistrationDisabled: true },
|
|
50802
|
+
};
|
|
50803
|
+
}
|
|
50770
50804
|
requirements = await applyCommitmentsToAgentModelRequirements(requirements, filteredCommitments, options);
|
|
50771
50805
|
requirements = await augmentAgentModelRequirementsFromSource(requirements, parseResult, agentSource);
|
|
50772
50806
|
requirements = await materializeInlineKnowledgeSources(requirements, options === null || options === void 0 ? void 0 : options.inlineKnowledgeSourceUploader);
|