@promptbook/cli 0.112.0 → 0.113.0-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 +45 -29
- package/agents/default/developer.book +2 -1
- package/apps/agents-server/next.config.ts +21 -0
- package/apps/agents-server/src/app/admin/limits/LimitsClient.tsx +1 -1
- package/apps/agents-server/src/app/admin/update/UpdateClient.tsx +52 -33
- package/apps/agents-server/src/app/api/agent-folders/[folderId]/visibility/route.ts +19 -7
- package/apps/agents-server/src/app/api/agents/[agentName]/route.ts +8 -18
- package/apps/agents-server/src/app/api/internal/agent-runner-limits/route.ts +1 -1
- package/apps/agents-server/src/app/api/v1/agents/[agentId]/route.ts +13 -8
- package/apps/agents-server/src/components/AgentProfile/AgentCapabilityChips.tsx +39 -5
- package/apps/agents-server/src/components/Homepage/AgentCard.tsx +7 -1
- package/apps/agents-server/src/components/Homepage/AgentsList.tsx +3 -0
- package/apps/agents-server/src/components/Homepage/AgentsListHeader.tsx +41 -0
- package/apps/agents-server/src/components/Homepage/hiddenFolders.ts +104 -0
- package/apps/agents-server/src/components/Homepage/useAgentsListQueryState.ts +35 -0
- package/apps/agents-server/src/components/Homepage/useAgentsListState.ts +24 -4
- package/apps/agents-server/src/constants/serverLimits.ts +19 -0
- package/apps/agents-server/src/database/seedCoreAgents.ts +0 -2
- package/apps/agents-server/src/database/seedDefaultAgents.ts +0 -2
- package/apps/agents-server/src/tools/agent_progress.ts +4 -10
- package/apps/agents-server/src/utils/agentVisibility.ts +25 -62
- package/apps/agents-server/src/utils/createAgentWithDefaultVisibility.ts +3 -1
- package/apps/agents-server/src/utils/externalChatRunner/processExternalUserChatJob.ts +9 -17
- package/apps/agents-server/src/utils/localChatRunner/LocalUserChatJobMetadata.ts +15 -5
- package/apps/agents-server/src/utils/localChatRunner/processLocalUserChatJob.ts +17 -26
- package/apps/agents-server/src/utils/serverLimits.ts +2 -0
- package/apps/agents-server/src/utils/serverManagement/createManagedServer/seedServerCoreAgents.ts +2 -2
- package/apps/agents-server/src/utils/serverManagement/createManagedServer/seedServerDefaultAgents.ts +1 -1
- package/apps/agents-server/src/utils/userChat/createUserChatHarnessProgressCard.ts +0 -6
- package/apps/agents-server/src/utils/userChat/createUserChatRunnerProgressCard.ts +0 -6
- package/apps/agents-server/src/utils/userChat/userChatMessageLifecycle.ts +69 -0
- package/apps/agents-server/src/utils/userChat/userChatProgressCard.ts +0 -6
- package/apps/agents-server/src/utils/vpsSelfUpdate.ts +138 -24
- package/esm/apps/agents-server/src/constants/serverLimits.d.ts +17 -0
- package/esm/index.es.js +581 -93
- package/esm/index.es.js.map +1 -1
- package/esm/scripts/run-agent-messages/main/runMultipleAgentMessages.d.ts +1 -0
- package/esm/scripts/run-agent-messages/main/tickAgentMessages.d.ts +1 -0
- package/esm/src/_packages/core.index.d.ts +22 -0
- package/esm/src/_packages/types.index.d.ts +2 -0
- package/esm/src/book-2.0/agent-source/AgentBasicInformation.d.ts +2 -0
- package/esm/src/book-2.0/agent-source/agentSourceVisibility.d.ts +97 -0
- package/esm/src/book-2.0/agent-source/agentSourceVisibility.test.d.ts +1 -0
- package/esm/src/book-components/BookEditor/BookEditorMonacoTokenization.d.ts +1 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer.d.ts +6 -0
- package/esm/src/collection/agent-collection/CreateAgentInput.d.ts +2 -1
- package/esm/src/collection/agent-collection/constructors/agent-collection-in-supabase/prepareAgentSourceForPersistence.d.ts +21 -1
- package/esm/src/commitments/META_VISIBILITY/META_VISIBILITY.d.ts +27 -0
- package/esm/src/commitments/index.d.ts +2 -1
- package/esm/src/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/_packages/core.index.ts +22 -0
- package/src/_packages/types.index.ts +2 -0
- package/src/book-2.0/agent-source/AgentBasicInformation.ts +2 -0
- package/src/book-2.0/agent-source/agentSourceVisibility.ts +214 -0
- package/src/book-2.0/agent-source/parseAgentSource/applyMetaCommitment.ts +17 -0
- package/src/book-2.0/book-language-documentation/createStandaloneBookLanguageMarkdown.ts +1 -0
- package/src/book-components/BookEditor/BookEditorMonacoTokenization.ts +11 -0
- package/src/book-components/BookEditor/useBookEditorMonacoLanguage.ts +7 -3
- package/src/cli/cli-commands/agents-server/buildAgentsServer.ts +144 -16
- package/src/cli/cli-commands/agents-server/startAgentsServer.ts +22 -2
- package/src/cli/cli-commands/coder/getDefaultCoderPackageJsonScripts.ts +1 -1
- package/src/cli/cli-commands/coder/run.ts +30 -0
- package/src/collection/agent-collection/CreateAgentInput.ts +10 -5
- package/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.ts +7 -3
- package/src/collection/agent-collection/constructors/agent-collection-in-supabase/createAgentPersistenceRecords.ts +7 -4
- package/src/collection/agent-collection/constructors/agent-collection-in-supabase/prepareAgentSourceForPersistence.ts +44 -8
- package/src/commitments/META_VISIBILITY/META_VISIBILITY.ts +78 -0
- package/src/commitments/index.ts +2 -0
- package/src/other/templates/getTemplatesPipelineCollection.ts +854 -692
- package/src/version.ts +2 -2
- package/src/versions.txt +1 -0
- package/umd/apps/agents-server/src/constants/serverLimits.d.ts +17 -0
- package/umd/index.umd.js +581 -93
- package/umd/index.umd.js.map +1 -1
- package/umd/scripts/run-agent-messages/main/runMultipleAgentMessages.d.ts +1 -0
- package/umd/scripts/run-agent-messages/main/tickAgentMessages.d.ts +1 -0
- package/umd/src/_packages/core.index.d.ts +22 -0
- package/umd/src/_packages/types.index.d.ts +2 -0
- package/umd/src/book-2.0/agent-source/AgentBasicInformation.d.ts +2 -0
- package/umd/src/book-2.0/agent-source/agentSourceVisibility.d.ts +97 -0
- package/umd/src/book-2.0/agent-source/agentSourceVisibility.test.d.ts +1 -0
- package/umd/src/book-components/BookEditor/BookEditorMonacoTokenization.d.ts +1 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer.d.ts +6 -0
- package/umd/src/collection/agent-collection/CreateAgentInput.d.ts +2 -1
- package/umd/src/collection/agent-collection/constructors/agent-collection-in-supabase/prepareAgentSourceForPersistence.d.ts +21 -1
- package/umd/src/commitments/META_VISIBILITY/META_VISIBILITY.d.ts +27 -0
- package/umd/src/commitments/index.d.ts +2 -1
- package/umd/src/version.d.ts +1 -1
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { spaceTrim } from 'spacetrim';
|
|
2
|
+
import type { AgentModelRequirements } from '../../book-2.0/agent-source/AgentModelRequirements';
|
|
3
|
+
import { TODO_USE } from '../../utils/organization/TODO_USE';
|
|
4
|
+
import { BaseCommitmentDefinition } from '../_base/BaseCommitmentDefinition';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* META VISIBILITY commitment definition.
|
|
8
|
+
*
|
|
9
|
+
* The `META VISIBILITY` commitment stores whether an agent is public, private, or unlisted.
|
|
10
|
+
* Agents Server mirrors this value into the database for efficient filtering, but the book
|
|
11
|
+
* commitment remains the editable source of truth.
|
|
12
|
+
*
|
|
13
|
+
* @private Metadata-only commitment used by Agents Server.
|
|
14
|
+
*/
|
|
15
|
+
export class MetaVisibilityCommitmentDefinition extends BaseCommitmentDefinition<'META VISIBILITY'> {
|
|
16
|
+
public constructor() {
|
|
17
|
+
super('META VISIBILITY');
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Short one-line description of META VISIBILITY.
|
|
22
|
+
*/
|
|
23
|
+
get description(): string {
|
|
24
|
+
return 'Set whether the agent is private, unlisted, or public.';
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Icon for this commitment.
|
|
29
|
+
*/
|
|
30
|
+
get icon(): string {
|
|
31
|
+
return '👁️';
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Markdown documentation for META VISIBILITY commitment.
|
|
36
|
+
*/
|
|
37
|
+
get documentation(): string {
|
|
38
|
+
return spaceTrim(`
|
|
39
|
+
# META VISIBILITY
|
|
40
|
+
|
|
41
|
+
Sets the agent visibility used by Agents Server.
|
|
42
|
+
|
|
43
|
+
## Allowed values
|
|
44
|
+
|
|
45
|
+
- \`PRIVATE\` - accessible only to signed-in users with access.
|
|
46
|
+
- \`UNLISTED\` - accessible by direct link but hidden from public listings.
|
|
47
|
+
- \`PUBLIC\` - visible in public listings and accessible by anyone.
|
|
48
|
+
|
|
49
|
+
## Key aspects
|
|
50
|
+
|
|
51
|
+
- Does not modify the agent's behavior, system message, or tools.
|
|
52
|
+
- Whitespace and letter case are normalized when persisted.
|
|
53
|
+
- If multiple \`META VISIBILITY\` commitments are present, persistence keeps one normalized value.
|
|
54
|
+
- Agents Server mirrors the value into the database for filtering, but the book is the source of truth.
|
|
55
|
+
|
|
56
|
+
## Example
|
|
57
|
+
|
|
58
|
+
\`\`\`book
|
|
59
|
+
Helpful Assistant
|
|
60
|
+
|
|
61
|
+
GOAL Be helpful and friendly.
|
|
62
|
+
META VISIBILITY PUBLIC
|
|
63
|
+
\`\`\`
|
|
64
|
+
`);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
public applyToAgentModelRequirements(
|
|
68
|
+
requirements: AgentModelRequirements,
|
|
69
|
+
content: string,
|
|
70
|
+
): AgentModelRequirements {
|
|
71
|
+
TODO_USE(content);
|
|
72
|
+
|
|
73
|
+
// META VISIBILITY is metadata only and does not alter model requirements.
|
|
74
|
+
return requirements;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// Note: [💞] Ignore a discrepancy between file name and entity name
|
package/src/commitments/index.ts
CHANGED
|
@@ -28,6 +28,7 @@ import { MetaFontCommitmentDefinition } from './META_FONT/META_FONT';
|
|
|
28
28
|
import { MetaImageCommitmentDefinition } from './META_IMAGE/META_IMAGE';
|
|
29
29
|
import { MetaInputPlaceholderCommitmentDefinition } from './META_INPUT_PLACEHOLDER/META_INPUT_PLACEHOLDER';
|
|
30
30
|
import { MetaLinkCommitmentDefinition } from './META_LINK/META_LINK';
|
|
31
|
+
import { MetaVisibilityCommitmentDefinition } from './META_VISIBILITY/META_VISIBILITY';
|
|
31
32
|
import { MetaVoiceCommitmentDefinition } from './META_VOICE/META_VOICE';
|
|
32
33
|
import { ModelCommitmentDefinition } from './MODEL/MODEL';
|
|
33
34
|
import { NoteCommitmentDefinition } from './NOTE/NOTE';
|
|
@@ -102,6 +103,7 @@ export const COMMITMENT_REGISTRY = [
|
|
|
102
103
|
new MetaDomainCommitmentDefinition(),
|
|
103
104
|
new MetaDisclaimerCommitmentDefinition(),
|
|
104
105
|
new MetaInputPlaceholderCommitmentDefinition(),
|
|
106
|
+
new MetaVisibilityCommitmentDefinition(),
|
|
105
107
|
new MetaCommitmentDefinition(),
|
|
106
108
|
new MetaVoiceCommitmentDefinition(),
|
|
107
109
|
new NoteCommitmentDefinition('NOTE'),
|