@promptbook/browser 0.114.0-42 → 0.114.0-48
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 +2 -2
- 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-48';
|
|
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
|
|
@@ -12825,6 +12825,18 @@ class TeamCommitmentDefinition extends BaseCommitmentDefinition {
|
|
|
12825
12825
|
|
|
12826
12826
|
Registers teammate agents that the current agent can consult via tools.
|
|
12827
12827
|
|
|
12828
|
+
The primary agent sends a question and relevant context to a teammate and receives an attributed answer.
|
|
12829
|
+
Each teammate uses its own Book. Declaring a team makes advisers available when relevant; it does not
|
|
12830
|
+
merge their rules into the primary agent or start every teammate automatically.
|
|
12831
|
+
|
|
12832
|
+
In \`ptbk coder run\` and \`ptbk coder plan\`, TEAM entries in the selected Book, its ancestors and imports
|
|
12833
|
+
use the existing reference rules: \`@Name\`, \`{Agent Name}\`, \`{./lawyer.book}\`, project paths such as
|
|
12834
|
+
\`{agents/lawyer.book}\`, and HTTP(S) Book URLs. Local advisers require no Agents Server. A remote Book
|
|
12835
|
+
must be readable through its normal endpoint; private or inaccessible sources return errors.
|
|
12836
|
+
Coding harnesses expose scoped command tools; planning uses restricted host tools and currently requires
|
|
12837
|
+
OpenAI Codex. Planning restrictions apply to every adviser, including custom Developer Books.
|
|
12838
|
+
The primary agent retains responsibility for the task, PRD proposals and final output.
|
|
12839
|
+
|
|
12828
12840
|
## Examples
|
|
12829
12841
|
|
|
12830
12842
|
\`\`\`book
|
|
@@ -12836,7 +12848,7 @@ class TeamCommitmentDefinition extends BaseCommitmentDefinition {
|
|
|
12836
12848
|
`);
|
|
12837
12849
|
}
|
|
12838
12850
|
applyToAgentModelRequirements(requirements, content) {
|
|
12839
|
-
var _a, _b, _c;
|
|
12851
|
+
var _a, _b, _c, _d;
|
|
12840
12852
|
const trimmedContent = content.trim();
|
|
12841
12853
|
if (!trimmedContent) {
|
|
12842
12854
|
return requirements;
|
|
@@ -12850,20 +12862,30 @@ class TeamCommitmentDefinition extends BaseCommitmentDefinition {
|
|
|
12850
12862
|
const existingTeammates = ((_b = requirements._metadata) === null || _b === void 0 ? void 0 : _b.teammates) || [];
|
|
12851
12863
|
const preResolvedProfiles = (((_c = requirements._metadata) === null || _c === void 0 ? void 0 : _c.preResolvedTeammateProfiles) || {});
|
|
12852
12864
|
const resolvedTeammates = resolveTeamTeammateLabels(trimmedContent, teammates);
|
|
12865
|
+
const toolUrls = new Map(existingTeammates.map((teammate) => [teammate.toolName, teammate.url]));
|
|
12853
12866
|
const teamEntries = resolvedTeammates.map((teammate) => {
|
|
12854
12867
|
const profile = preResolvedProfiles[teammate.url];
|
|
12855
12868
|
const resolvedLabel = (profile === null || profile === void 0 ? void 0 : profile.agentName) || teammate.label;
|
|
12856
12869
|
const existingTeammate = existingTeammates.find((entry) => entry.url === teammate.url);
|
|
12870
|
+
const baseToolName = (existingTeammate === null || existingTeammate === void 0 ? void 0 : existingTeammate.toolName) || createTeamToolName(teammate.url, resolvedLabel);
|
|
12871
|
+
let toolName = baseToolName;
|
|
12872
|
+
let suffix = 1;
|
|
12873
|
+
// Explicit paths can identify distinct Books with the same display name or normalized label.
|
|
12874
|
+
while (toolUrls.has(toolName) && toolUrls.get(toolName) !== teammate.url) {
|
|
12875
|
+
toolName = `${baseToolName}_${++suffix}`;
|
|
12876
|
+
}
|
|
12877
|
+
toolUrls.set(toolName, teammate.url);
|
|
12857
12878
|
return {
|
|
12858
|
-
toolName:
|
|
12859
|
-
createTeamToolName(teammate.url, resolvedLabel)),
|
|
12879
|
+
toolName: toolName,
|
|
12860
12880
|
teammate: { ...teammate, label: resolvedLabel },
|
|
12861
12881
|
agentName,
|
|
12862
12882
|
description: (profile === null || profile === void 0 ? void 0 : profile.personaDescription) || null,
|
|
12863
12883
|
};
|
|
12864
12884
|
});
|
|
12865
|
-
|
|
12866
|
-
|
|
12885
|
+
if (!((_d = requirements._metadata) === null || _d === void 0 ? void 0 : _d.isTeamToolRegistrationDisabled)) {
|
|
12886
|
+
for (const entry of teamEntries) {
|
|
12887
|
+
registerTeamTool(entry);
|
|
12888
|
+
}
|
|
12867
12889
|
}
|
|
12868
12890
|
const existingTools = requirements.tools || [];
|
|
12869
12891
|
const updatedTools = [...existingTools];
|
|
@@ -26389,9 +26411,15 @@ async function preResolveTeammateProfilesForTeamCommitment(requirements, commitm
|
|
|
26389
26411
|
if (preResolvedTeammateProfiles[teammate.url]) {
|
|
26390
26412
|
continue;
|
|
26391
26413
|
}
|
|
26392
|
-
|
|
26393
|
-
|
|
26394
|
-
|
|
26414
|
+
try {
|
|
26415
|
+
const profile = await profileResolver.resolveTeammateProfile(teammate.url);
|
|
26416
|
+
if (profile) {
|
|
26417
|
+
preResolvedTeammateProfiles[teammate.url] = profile;
|
|
26418
|
+
}
|
|
26419
|
+
}
|
|
26420
|
+
catch (error) {
|
|
26421
|
+
// One inaccessible adviser must not erase the names and roles of other callable teammates.
|
|
26422
|
+
console.warn(`Failed to resolve TEAM profile for ${teammate.url}:`, error);
|
|
26395
26423
|
}
|
|
26396
26424
|
}
|
|
26397
26425
|
return {
|
|
@@ -27338,6 +27366,12 @@ async function createAgentModelRequirementsWithCommitments(agentSource, modelNam
|
|
|
27338
27366
|
const parseResult = parseAgentSourceWithCommitments(agentSource);
|
|
27339
27367
|
const filteredCommitments = filterCommitmentsForAgentModelRequirements(parseResult.commitments);
|
|
27340
27368
|
let requirements = createInitialAgentModelRequirements(parseResult.agentName, modelName);
|
|
27369
|
+
if (options === null || options === void 0 ? void 0 : options.isTeamToolRegistrationDisabled) {
|
|
27370
|
+
requirements = {
|
|
27371
|
+
...requirements,
|
|
27372
|
+
_metadata: { ...requirements._metadata, isTeamToolRegistrationDisabled: true },
|
|
27373
|
+
};
|
|
27374
|
+
}
|
|
27341
27375
|
requirements = await applyCommitmentsToAgentModelRequirements(requirements, filteredCommitments, options);
|
|
27342
27376
|
requirements = await augmentAgentModelRequirementsFromSource(requirements, parseResult, agentSource);
|
|
27343
27377
|
requirements = await materializeInlineKnowledgeSources(requirements, options === null || options === void 0 ? void 0 : options.inlineKnowledgeSourceUploader);
|