@promptbook/core 0.114.0-42 → 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
|
@@ -26,7 +26,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
|
|
|
26
26
|
* @generated
|
|
27
27
|
* @see https://github.com/webgptorg/promptbook
|
|
28
28
|
*/
|
|
29
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.114.0-
|
|
29
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.114.0-47';
|
|
30
30
|
/**
|
|
31
31
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
32
32
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -19672,6 +19672,18 @@ class TeamCommitmentDefinition extends BaseCommitmentDefinition {
|
|
|
19672
19672
|
|
|
19673
19673
|
Registers teammate agents that the current agent can consult via tools.
|
|
19674
19674
|
|
|
19675
|
+
The primary agent sends a question and relevant context to a teammate and receives an attributed answer.
|
|
19676
|
+
Each teammate uses its own Book. Declaring a team makes advisers available when relevant; it does not
|
|
19677
|
+
merge their rules into the primary agent or start every teammate automatically.
|
|
19678
|
+
|
|
19679
|
+
In \`ptbk coder run\` and \`ptbk coder plan\`, TEAM entries in the selected Book, its ancestors and imports
|
|
19680
|
+
use the existing reference rules: \`@Name\`, \`{Agent Name}\`, \`{./lawyer.book}\`, project paths such as
|
|
19681
|
+
\`{agents/lawyer.book}\`, and HTTP(S) Book URLs. Local advisers require no Agents Server. A remote Book
|
|
19682
|
+
must be readable through its normal endpoint; private or inaccessible sources return errors.
|
|
19683
|
+
Coding harnesses expose scoped command tools; planning uses restricted host tools and currently requires
|
|
19684
|
+
OpenAI Codex. Planning restrictions apply to every adviser, including custom Developer Books.
|
|
19685
|
+
The primary agent retains responsibility for the task, PRD proposals and final output.
|
|
19686
|
+
|
|
19675
19687
|
## Examples
|
|
19676
19688
|
|
|
19677
19689
|
\`\`\`book
|
|
@@ -19683,7 +19695,7 @@ class TeamCommitmentDefinition extends BaseCommitmentDefinition {
|
|
|
19683
19695
|
`);
|
|
19684
19696
|
}
|
|
19685
19697
|
applyToAgentModelRequirements(requirements, content) {
|
|
19686
|
-
var _a, _b, _c;
|
|
19698
|
+
var _a, _b, _c, _d;
|
|
19687
19699
|
const trimmedContent = content.trim();
|
|
19688
19700
|
if (!trimmedContent) {
|
|
19689
19701
|
return requirements;
|
|
@@ -19697,20 +19709,30 @@ class TeamCommitmentDefinition extends BaseCommitmentDefinition {
|
|
|
19697
19709
|
const existingTeammates = ((_b = requirements._metadata) === null || _b === void 0 ? void 0 : _b.teammates) || [];
|
|
19698
19710
|
const preResolvedProfiles = (((_c = requirements._metadata) === null || _c === void 0 ? void 0 : _c.preResolvedTeammateProfiles) || {});
|
|
19699
19711
|
const resolvedTeammates = resolveTeamTeammateLabels(trimmedContent, teammates);
|
|
19712
|
+
const toolUrls = new Map(existingTeammates.map((teammate) => [teammate.toolName, teammate.url]));
|
|
19700
19713
|
const teamEntries = resolvedTeammates.map((teammate) => {
|
|
19701
19714
|
const profile = preResolvedProfiles[teammate.url];
|
|
19702
19715
|
const resolvedLabel = (profile === null || profile === void 0 ? void 0 : profile.agentName) || teammate.label;
|
|
19703
19716
|
const existingTeammate = existingTeammates.find((entry) => entry.url === teammate.url);
|
|
19717
|
+
const baseToolName = (existingTeammate === null || existingTeammate === void 0 ? void 0 : existingTeammate.toolName) || createTeamToolName(teammate.url, resolvedLabel);
|
|
19718
|
+
let toolName = baseToolName;
|
|
19719
|
+
let suffix = 1;
|
|
19720
|
+
// Explicit paths can identify distinct Books with the same display name or normalized label.
|
|
19721
|
+
while (toolUrls.has(toolName) && toolUrls.get(toolName) !== teammate.url) {
|
|
19722
|
+
toolName = `${baseToolName}_${++suffix}`;
|
|
19723
|
+
}
|
|
19724
|
+
toolUrls.set(toolName, teammate.url);
|
|
19704
19725
|
return {
|
|
19705
|
-
toolName:
|
|
19706
|
-
createTeamToolName(teammate.url, resolvedLabel)),
|
|
19726
|
+
toolName: toolName,
|
|
19707
19727
|
teammate: { ...teammate, label: resolvedLabel },
|
|
19708
19728
|
agentName,
|
|
19709
19729
|
description: (profile === null || profile === void 0 ? void 0 : profile.personaDescription) || null,
|
|
19710
19730
|
};
|
|
19711
19731
|
});
|
|
19712
|
-
|
|
19713
|
-
|
|
19732
|
+
if (!((_d = requirements._metadata) === null || _d === void 0 ? void 0 : _d.isTeamToolRegistrationDisabled)) {
|
|
19733
|
+
for (const entry of teamEntries) {
|
|
19734
|
+
registerTeamTool(entry);
|
|
19735
|
+
}
|
|
19714
19736
|
}
|
|
19715
19737
|
const existingTools = requirements.tools || [];
|
|
19716
19738
|
const updatedTools = [...existingTools];
|
|
@@ -24300,9 +24322,15 @@ async function preResolveTeammateProfilesForTeamCommitment(requirements, commitm
|
|
|
24300
24322
|
if (preResolvedTeammateProfiles[teammate.url]) {
|
|
24301
24323
|
continue;
|
|
24302
24324
|
}
|
|
24303
|
-
|
|
24304
|
-
|
|
24305
|
-
|
|
24325
|
+
try {
|
|
24326
|
+
const profile = await profileResolver.resolveTeammateProfile(teammate.url);
|
|
24327
|
+
if (profile) {
|
|
24328
|
+
preResolvedTeammateProfiles[teammate.url] = profile;
|
|
24329
|
+
}
|
|
24330
|
+
}
|
|
24331
|
+
catch (error) {
|
|
24332
|
+
// One inaccessible adviser must not erase the names and roles of other callable teammates.
|
|
24333
|
+
console.warn(`Failed to resolve TEAM profile for ${teammate.url}:`, error);
|
|
24306
24334
|
}
|
|
24307
24335
|
}
|
|
24308
24336
|
return {
|
|
@@ -25526,6 +25554,12 @@ async function createAgentModelRequirementsWithCommitments(agentSource, modelNam
|
|
|
25526
25554
|
const parseResult = parseAgentSourceWithCommitments(agentSource);
|
|
25527
25555
|
const filteredCommitments = filterCommitmentsForAgentModelRequirements(parseResult.commitments);
|
|
25528
25556
|
let requirements = createInitialAgentModelRequirements(parseResult.agentName, modelName);
|
|
25557
|
+
if (options === null || options === void 0 ? void 0 : options.isTeamToolRegistrationDisabled) {
|
|
25558
|
+
requirements = {
|
|
25559
|
+
...requirements,
|
|
25560
|
+
_metadata: { ...requirements._metadata, isTeamToolRegistrationDisabled: true },
|
|
25561
|
+
};
|
|
25562
|
+
}
|
|
25529
25563
|
requirements = await applyCommitmentsToAgentModelRequirements(requirements, filteredCommitments, options);
|
|
25530
25564
|
requirements = await augmentAgentModelRequirementsFromSource(requirements, parseResult, agentSource);
|
|
25531
25565
|
requirements = await materializeInlineKnowledgeSources(requirements, options === null || options === void 0 ? void 0 : options.inlineKnowledgeSourceUploader);
|