@astralform/js 9.3.0 → 9.4.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/dist/index.cjs +73 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +88 -1
- package/dist/index.d.ts +88 -1
- package/dist/index.js +73 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -644,6 +644,17 @@ interface Conversation {
|
|
|
644
644
|
* null) from an Astralform older than 0.69.46.
|
|
645
645
|
*/
|
|
646
646
|
repository?: string | null;
|
|
647
|
+
/**
|
|
648
|
+
* The code group this task is filed under, or `null`/absent when it is not in
|
|
649
|
+
* one. MUTABLE — unlike `repository`, which is written once on the first turn:
|
|
650
|
+
* a group is a label the user applies to work that already exists, so a task
|
|
651
|
+
* may join, move between, or leave groups at any time.
|
|
652
|
+
*
|
|
653
|
+
* Absent from an Astralform older than the one that introduced groups (phase 1
|
|
654
|
+
* of `docs/refactor/workspace-groups`), which is why it is optional rather
|
|
655
|
+
* than `string | null`.
|
|
656
|
+
*/
|
|
657
|
+
groupId?: string | null;
|
|
647
658
|
}
|
|
648
659
|
/** One citation on a `web_search`-style tool row, as the clients parse it. */
|
|
649
660
|
interface ToolSource {
|
|
@@ -959,6 +970,31 @@ interface CodeProject {
|
|
|
959
970
|
repoFullName: string;
|
|
960
971
|
addedAt: string;
|
|
961
972
|
}
|
|
973
|
+
/**
|
|
974
|
+
* One group of tasks working a single feature, under one repository.
|
|
975
|
+
*
|
|
976
|
+
* Groups are the app user's own, on one agent, under one repository: two people
|
|
977
|
+
* using the same agent curate their own. The title is user-supplied and
|
|
978
|
+
* renameable, and membership is mutable — see {@link Conversation.groupId}.
|
|
979
|
+
*/
|
|
980
|
+
interface ConversationGroup {
|
|
981
|
+
id: string;
|
|
982
|
+
repository: string;
|
|
983
|
+
title: string;
|
|
984
|
+
createdAt: string;
|
|
985
|
+
updatedAt: string;
|
|
986
|
+
}
|
|
987
|
+
/**
|
|
988
|
+
* A task filed under a group, as the assign call answers it.
|
|
989
|
+
*
|
|
990
|
+
* The server returns this body rather than `204`: `post` always parses a JSON
|
|
991
|
+
* body, so a No Content reply would surface as a parse error on a successful
|
|
992
|
+
* write. It is also the confirmation that the write landed.
|
|
993
|
+
*/
|
|
994
|
+
interface CodeGroupMembership {
|
|
995
|
+
groupId: string;
|
|
996
|
+
conversationId: string;
|
|
997
|
+
}
|
|
962
998
|
/** A repository the workspace's GitHub installations cover. */
|
|
963
999
|
interface AvailableRepository {
|
|
964
1000
|
fullName: string;
|
|
@@ -1790,6 +1826,57 @@ declare class AstralformClient {
|
|
|
1790
1826
|
*/
|
|
1791
1827
|
remove: (owner: string, repo: string) => Promise<void>;
|
|
1792
1828
|
};
|
|
1829
|
+
/**
|
|
1830
|
+
* Code groups: a user-named container under one repository, for a feature
|
|
1831
|
+
* whose work outlives a single session. Its sessions share one plan and one
|
|
1832
|
+
* set of notes, so what one writes the others read.
|
|
1833
|
+
*
|
|
1834
|
+
* A group is a LABEL, not a binding — unlike a task's project, which is
|
|
1835
|
+
* written once on the first turn. A task may join, move between, or leave
|
|
1836
|
+
* groups at any time, and a deleted group's sessions survive as ungrouped.
|
|
1837
|
+
*
|
|
1838
|
+
* The server enforces three things worth knowing before you render a
|
|
1839
|
+
* failure: a group that is not this user's answers `404` (never `403`, so a
|
|
1840
|
+
* group id cannot be probed); filing a task into a group under a DIFFERENT
|
|
1841
|
+
* repository than the task's answers `409`; and the group's plan and notes
|
|
1842
|
+
* are deleted with the group, while each session keeps its own.
|
|
1843
|
+
*/
|
|
1844
|
+
groups: {
|
|
1845
|
+
/**
|
|
1846
|
+
* This user's groups, oldest first. Pass a repository to narrow to one
|
|
1847
|
+
* repository's — the composer's picker does; the sidebar asks once and
|
|
1848
|
+
* nests them itself.
|
|
1849
|
+
*/
|
|
1850
|
+
list: (repository?: string) => Promise<ConversationGroup[]>;
|
|
1851
|
+
/**
|
|
1852
|
+
* Create a group under a repository. The repository goes through the same
|
|
1853
|
+
* normaliser the Projects surface uses, so a pasted GitHub URL is accepted
|
|
1854
|
+
* and anything that is not `owner/repo` is refused.
|
|
1855
|
+
*/
|
|
1856
|
+
create: (repository: string, title: string) => Promise<ConversationGroup>;
|
|
1857
|
+
/** Rename a group. A group that is not this user's answers `404`. */
|
|
1858
|
+
rename: (groupId: string, title: string) => Promise<ConversationGroup>;
|
|
1859
|
+
/**
|
|
1860
|
+
* Delete a group. Its tasks survive and become ungrouped, each keeping its
|
|
1861
|
+
* own plan and notes; the group's SHARED documents are deleted with it.
|
|
1862
|
+
*/
|
|
1863
|
+
remove: (groupId: string) => Promise<void>;
|
|
1864
|
+
/**
|
|
1865
|
+
* File a task into a group. Idempotent — filing an already-filed task
|
|
1866
|
+
* again is the same state, not an error. Refused with `409` when the task
|
|
1867
|
+
* belongs to a different repository than the group, because it would
|
|
1868
|
+
* render nowhere in the sidebar.
|
|
1869
|
+
*/
|
|
1870
|
+
assign: (groupId: string, conversationId: string) => Promise<CodeGroupMembership>;
|
|
1871
|
+
/**
|
|
1872
|
+
* Take a task out of its group. The task and its documents are untouched.
|
|
1873
|
+
*
|
|
1874
|
+
* Deliberately not strict about WHICH group the task is in: a task that is
|
|
1875
|
+
* in a different one (or in none) already satisfies "this task should not
|
|
1876
|
+
* be grouped", so the call clears it rather than refusing.
|
|
1877
|
+
*/
|
|
1878
|
+
unassign: (groupId: string, conversationId: string) => Promise<void>;
|
|
1879
|
+
};
|
|
1793
1880
|
};
|
|
1794
1881
|
createJob(request: ChatStreamRequest): Promise<JobCreateResponse>;
|
|
1795
1882
|
streamJobEvents(jobId: string, afterSeq?: number, signal?: AbortSignal): AsyncGenerator<ChatStreamEvent>;
|
|
@@ -2766,4 +2853,4 @@ declare function isEmbeddedResource(value: unknown): value is {
|
|
|
2766
2853
|
*/
|
|
2767
2854
|
declare function parseEmbeddedResource(value: unknown): EmbeddedResource | null;
|
|
2768
2855
|
|
|
2769
|
-
export { type ActiveJob, type AgentCapability, type AgentIdentity, type AgentInfo, type AgentStatus, type AssetCreatedPayload, type AstralformApiKeyConfig, AstralformClient, type AstralformConfig, AstralformError, type AstralformUserTokenConfig, type AttachmentStagedPayload, AuthenticationError, type AvailableRepositories, type AvailableRepository, type BlockDeltaPayload, CONVERSATION_PAGE_SIZE, type ChatEvent, ChatEventType, type ChatEventTypeValue, ChatSession, type ChatStorage, type ChatStreamEvent, type ChatStreamRequest, type CodeProject, ConnectionError, type ContextUpdatePayload, type ContextWarningPayload, type Conversation, type ConversationAsset, type ConversationEvent, type ConversationJob, type ConversationJobAttachment, type DesktopStreamPayload, type EffortRung, type EmbeddedResource, type FeedbackRequest, type FeedbackResponse, InMemoryStorage, type JobCreateResponse, type JobStatus, type JobSummary, type JobsPage, LLMNotConfiguredError, type MemoryProviderErrorPayload, type MemoryRecallPayload, type MemoryRecord, type MemoryUpdatePayload, type Message, type MessagesPage, type ModelChoiceOptions, type ModelOption, type MyToolGrantsPage, type NestedLlmUsagePayload, type NoteUpdatePayload, type PlanUpdatePayload, type PromptSuggestionPayload, type ProtocolAdapter, ProtocolRegistry, RateLimitError, type RateLimitErrorDetails, type RawSseEvent, type ReasoningEffort, type SendOptions, ServerError, type SendOptions$1 as SessionSendOptions, type SkillInfo, type SlashCommand, type SlashCommandSurface, StreamAbortedError, type StreamJobSSEOptions, StreamManager, type StreamManagerEvent, type StreamState, type SubagentStartPayload, type SubagentStopPayload, type TaskStatus, type TeamAgentSummary, type TeamSummary, type ThinkingDescriptor, type ThinkingRungOption, type TitleGeneratedPayload, type TodoItem, type TodoUpdatePayload, type ToolApprovalDecision, type ToolApprovalGrantedPayload, type ToolApprovalRequest, type ToolApprovalRequestedPayload, type ToolApprovalScope, type ToolCallRequest, type ToolDefinition, type ToolGrant, type ToolHandler, type ToolHarnessWarningPayload, type ToolImageMode, type ToolImageStub, type ToolOutputMode, type ToolOutputStub, type ToolProgressPayload, ToolRegistry, type ToolResult, type ToolResultRequest, type ToolSource, type TurnUsage, type UIComponentsConfig, type UserUnavailablePayload, VOICE_POLISH_MODES, type VoiceConfig, type VoiceLLMMode, type VoicePolishEvent, type VoicePolishMode, type VoicePolishRequest, type VoiceTranscribeOptions, type VoiceTranscript, type WireBlockDelta, type WireBlockDeltaPayload, type WireBlockKind, type WireBlockStart, type WireBlockStatus, type WireBlockStop, type WireCustomEvent, type WireErrorEvent, type WireEvent, type WireInputArgDelta, type WireInputDelta, type WireKeepalive, type WireMessageStart, type WireMessageStop, type WireOutputDelta, type WireRetryEvent, type WireSignatureDelta, type WireStallWarning, type WireStatusDelta, type WireStopReason, type WireTextDelta, type WireThinkingDelta, type WorkspaceReadyPayload, generateId, isEmbeddedResource, isToolImageStub, isToolOutputStub, isVoiceLLMMode, isVoicePolishMode, mapSseToChat, parseEmbeddedResource, parseVoicePolishFrame, replayEvents, streamJobSSE, translateDelta };
|
|
2856
|
+
export { type ActiveJob, type AgentCapability, type AgentIdentity, type AgentInfo, type AgentStatus, type AssetCreatedPayload, type AstralformApiKeyConfig, AstralformClient, type AstralformConfig, AstralformError, type AstralformUserTokenConfig, type AttachmentStagedPayload, AuthenticationError, type AvailableRepositories, type AvailableRepository, type BlockDeltaPayload, CONVERSATION_PAGE_SIZE, type ChatEvent, ChatEventType, type ChatEventTypeValue, ChatSession, type ChatStorage, type ChatStreamEvent, type ChatStreamRequest, type CodeGroupMembership, type CodeProject, ConnectionError, type ContextUpdatePayload, type ContextWarningPayload, type Conversation, type ConversationAsset, type ConversationEvent, type ConversationGroup, type ConversationJob, type ConversationJobAttachment, type DesktopStreamPayload, type EffortRung, type EmbeddedResource, type FeedbackRequest, type FeedbackResponse, InMemoryStorage, type JobCreateResponse, type JobStatus, type JobSummary, type JobsPage, LLMNotConfiguredError, type MemoryProviderErrorPayload, type MemoryRecallPayload, type MemoryRecord, type MemoryUpdatePayload, type Message, type MessagesPage, type ModelChoiceOptions, type ModelOption, type MyToolGrantsPage, type NestedLlmUsagePayload, type NoteUpdatePayload, type PlanUpdatePayload, type PromptSuggestionPayload, type ProtocolAdapter, ProtocolRegistry, RateLimitError, type RateLimitErrorDetails, type RawSseEvent, type ReasoningEffort, type SendOptions, ServerError, type SendOptions$1 as SessionSendOptions, type SkillInfo, type SlashCommand, type SlashCommandSurface, StreamAbortedError, type StreamJobSSEOptions, StreamManager, type StreamManagerEvent, type StreamState, type SubagentStartPayload, type SubagentStopPayload, type TaskStatus, type TeamAgentSummary, type TeamSummary, type ThinkingDescriptor, type ThinkingRungOption, type TitleGeneratedPayload, type TodoItem, type TodoUpdatePayload, type ToolApprovalDecision, type ToolApprovalGrantedPayload, type ToolApprovalRequest, type ToolApprovalRequestedPayload, type ToolApprovalScope, type ToolCallRequest, type ToolDefinition, type ToolGrant, type ToolHandler, type ToolHarnessWarningPayload, type ToolImageMode, type ToolImageStub, type ToolOutputMode, type ToolOutputStub, type ToolProgressPayload, ToolRegistry, type ToolResult, type ToolResultRequest, type ToolSource, type TurnUsage, type UIComponentsConfig, type UserUnavailablePayload, VOICE_POLISH_MODES, type VoiceConfig, type VoiceLLMMode, type VoicePolishEvent, type VoicePolishMode, type VoicePolishRequest, type VoiceTranscribeOptions, type VoiceTranscript, type WireBlockDelta, type WireBlockDeltaPayload, type WireBlockKind, type WireBlockStart, type WireBlockStatus, type WireBlockStop, type WireCustomEvent, type WireErrorEvent, type WireEvent, type WireInputArgDelta, type WireInputDelta, type WireKeepalive, type WireMessageStart, type WireMessageStop, type WireOutputDelta, type WireRetryEvent, type WireSignatureDelta, type WireStallWarning, type WireStatusDelta, type WireStopReason, type WireTextDelta, type WireThinkingDelta, type WorkspaceReadyPayload, generateId, isEmbeddedResource, isToolImageStub, isToolOutputStub, isVoiceLLMMode, isVoicePolishMode, mapSseToChat, parseEmbeddedResource, parseVoicePolishFrame, replayEvents, streamJobSSE, translateDelta };
|
package/dist/index.d.ts
CHANGED
|
@@ -644,6 +644,17 @@ interface Conversation {
|
|
|
644
644
|
* null) from an Astralform older than 0.69.46.
|
|
645
645
|
*/
|
|
646
646
|
repository?: string | null;
|
|
647
|
+
/**
|
|
648
|
+
* The code group this task is filed under, or `null`/absent when it is not in
|
|
649
|
+
* one. MUTABLE — unlike `repository`, which is written once on the first turn:
|
|
650
|
+
* a group is a label the user applies to work that already exists, so a task
|
|
651
|
+
* may join, move between, or leave groups at any time.
|
|
652
|
+
*
|
|
653
|
+
* Absent from an Astralform older than the one that introduced groups (phase 1
|
|
654
|
+
* of `docs/refactor/workspace-groups`), which is why it is optional rather
|
|
655
|
+
* than `string | null`.
|
|
656
|
+
*/
|
|
657
|
+
groupId?: string | null;
|
|
647
658
|
}
|
|
648
659
|
/** One citation on a `web_search`-style tool row, as the clients parse it. */
|
|
649
660
|
interface ToolSource {
|
|
@@ -959,6 +970,31 @@ interface CodeProject {
|
|
|
959
970
|
repoFullName: string;
|
|
960
971
|
addedAt: string;
|
|
961
972
|
}
|
|
973
|
+
/**
|
|
974
|
+
* One group of tasks working a single feature, under one repository.
|
|
975
|
+
*
|
|
976
|
+
* Groups are the app user's own, on one agent, under one repository: two people
|
|
977
|
+
* using the same agent curate their own. The title is user-supplied and
|
|
978
|
+
* renameable, and membership is mutable — see {@link Conversation.groupId}.
|
|
979
|
+
*/
|
|
980
|
+
interface ConversationGroup {
|
|
981
|
+
id: string;
|
|
982
|
+
repository: string;
|
|
983
|
+
title: string;
|
|
984
|
+
createdAt: string;
|
|
985
|
+
updatedAt: string;
|
|
986
|
+
}
|
|
987
|
+
/**
|
|
988
|
+
* A task filed under a group, as the assign call answers it.
|
|
989
|
+
*
|
|
990
|
+
* The server returns this body rather than `204`: `post` always parses a JSON
|
|
991
|
+
* body, so a No Content reply would surface as a parse error on a successful
|
|
992
|
+
* write. It is also the confirmation that the write landed.
|
|
993
|
+
*/
|
|
994
|
+
interface CodeGroupMembership {
|
|
995
|
+
groupId: string;
|
|
996
|
+
conversationId: string;
|
|
997
|
+
}
|
|
962
998
|
/** A repository the workspace's GitHub installations cover. */
|
|
963
999
|
interface AvailableRepository {
|
|
964
1000
|
fullName: string;
|
|
@@ -1790,6 +1826,57 @@ declare class AstralformClient {
|
|
|
1790
1826
|
*/
|
|
1791
1827
|
remove: (owner: string, repo: string) => Promise<void>;
|
|
1792
1828
|
};
|
|
1829
|
+
/**
|
|
1830
|
+
* Code groups: a user-named container under one repository, for a feature
|
|
1831
|
+
* whose work outlives a single session. Its sessions share one plan and one
|
|
1832
|
+
* set of notes, so what one writes the others read.
|
|
1833
|
+
*
|
|
1834
|
+
* A group is a LABEL, not a binding — unlike a task's project, which is
|
|
1835
|
+
* written once on the first turn. A task may join, move between, or leave
|
|
1836
|
+
* groups at any time, and a deleted group's sessions survive as ungrouped.
|
|
1837
|
+
*
|
|
1838
|
+
* The server enforces three things worth knowing before you render a
|
|
1839
|
+
* failure: a group that is not this user's answers `404` (never `403`, so a
|
|
1840
|
+
* group id cannot be probed); filing a task into a group under a DIFFERENT
|
|
1841
|
+
* repository than the task's answers `409`; and the group's plan and notes
|
|
1842
|
+
* are deleted with the group, while each session keeps its own.
|
|
1843
|
+
*/
|
|
1844
|
+
groups: {
|
|
1845
|
+
/**
|
|
1846
|
+
* This user's groups, oldest first. Pass a repository to narrow to one
|
|
1847
|
+
* repository's — the composer's picker does; the sidebar asks once and
|
|
1848
|
+
* nests them itself.
|
|
1849
|
+
*/
|
|
1850
|
+
list: (repository?: string) => Promise<ConversationGroup[]>;
|
|
1851
|
+
/**
|
|
1852
|
+
* Create a group under a repository. The repository goes through the same
|
|
1853
|
+
* normaliser the Projects surface uses, so a pasted GitHub URL is accepted
|
|
1854
|
+
* and anything that is not `owner/repo` is refused.
|
|
1855
|
+
*/
|
|
1856
|
+
create: (repository: string, title: string) => Promise<ConversationGroup>;
|
|
1857
|
+
/** Rename a group. A group that is not this user's answers `404`. */
|
|
1858
|
+
rename: (groupId: string, title: string) => Promise<ConversationGroup>;
|
|
1859
|
+
/**
|
|
1860
|
+
* Delete a group. Its tasks survive and become ungrouped, each keeping its
|
|
1861
|
+
* own plan and notes; the group's SHARED documents are deleted with it.
|
|
1862
|
+
*/
|
|
1863
|
+
remove: (groupId: string) => Promise<void>;
|
|
1864
|
+
/**
|
|
1865
|
+
* File a task into a group. Idempotent — filing an already-filed task
|
|
1866
|
+
* again is the same state, not an error. Refused with `409` when the task
|
|
1867
|
+
* belongs to a different repository than the group, because it would
|
|
1868
|
+
* render nowhere in the sidebar.
|
|
1869
|
+
*/
|
|
1870
|
+
assign: (groupId: string, conversationId: string) => Promise<CodeGroupMembership>;
|
|
1871
|
+
/**
|
|
1872
|
+
* Take a task out of its group. The task and its documents are untouched.
|
|
1873
|
+
*
|
|
1874
|
+
* Deliberately not strict about WHICH group the task is in: a task that is
|
|
1875
|
+
* in a different one (or in none) already satisfies "this task should not
|
|
1876
|
+
* be grouped", so the call clears it rather than refusing.
|
|
1877
|
+
*/
|
|
1878
|
+
unassign: (groupId: string, conversationId: string) => Promise<void>;
|
|
1879
|
+
};
|
|
1793
1880
|
};
|
|
1794
1881
|
createJob(request: ChatStreamRequest): Promise<JobCreateResponse>;
|
|
1795
1882
|
streamJobEvents(jobId: string, afterSeq?: number, signal?: AbortSignal): AsyncGenerator<ChatStreamEvent>;
|
|
@@ -2766,4 +2853,4 @@ declare function isEmbeddedResource(value: unknown): value is {
|
|
|
2766
2853
|
*/
|
|
2767
2854
|
declare function parseEmbeddedResource(value: unknown): EmbeddedResource | null;
|
|
2768
2855
|
|
|
2769
|
-
export { type ActiveJob, type AgentCapability, type AgentIdentity, type AgentInfo, type AgentStatus, type AssetCreatedPayload, type AstralformApiKeyConfig, AstralformClient, type AstralformConfig, AstralformError, type AstralformUserTokenConfig, type AttachmentStagedPayload, AuthenticationError, type AvailableRepositories, type AvailableRepository, type BlockDeltaPayload, CONVERSATION_PAGE_SIZE, type ChatEvent, ChatEventType, type ChatEventTypeValue, ChatSession, type ChatStorage, type ChatStreamEvent, type ChatStreamRequest, type CodeProject, ConnectionError, type ContextUpdatePayload, type ContextWarningPayload, type Conversation, type ConversationAsset, type ConversationEvent, type ConversationJob, type ConversationJobAttachment, type DesktopStreamPayload, type EffortRung, type EmbeddedResource, type FeedbackRequest, type FeedbackResponse, InMemoryStorage, type JobCreateResponse, type JobStatus, type JobSummary, type JobsPage, LLMNotConfiguredError, type MemoryProviderErrorPayload, type MemoryRecallPayload, type MemoryRecord, type MemoryUpdatePayload, type Message, type MessagesPage, type ModelChoiceOptions, type ModelOption, type MyToolGrantsPage, type NestedLlmUsagePayload, type NoteUpdatePayload, type PlanUpdatePayload, type PromptSuggestionPayload, type ProtocolAdapter, ProtocolRegistry, RateLimitError, type RateLimitErrorDetails, type RawSseEvent, type ReasoningEffort, type SendOptions, ServerError, type SendOptions$1 as SessionSendOptions, type SkillInfo, type SlashCommand, type SlashCommandSurface, StreamAbortedError, type StreamJobSSEOptions, StreamManager, type StreamManagerEvent, type StreamState, type SubagentStartPayload, type SubagentStopPayload, type TaskStatus, type TeamAgentSummary, type TeamSummary, type ThinkingDescriptor, type ThinkingRungOption, type TitleGeneratedPayload, type TodoItem, type TodoUpdatePayload, type ToolApprovalDecision, type ToolApprovalGrantedPayload, type ToolApprovalRequest, type ToolApprovalRequestedPayload, type ToolApprovalScope, type ToolCallRequest, type ToolDefinition, type ToolGrant, type ToolHandler, type ToolHarnessWarningPayload, type ToolImageMode, type ToolImageStub, type ToolOutputMode, type ToolOutputStub, type ToolProgressPayload, ToolRegistry, type ToolResult, type ToolResultRequest, type ToolSource, type TurnUsage, type UIComponentsConfig, type UserUnavailablePayload, VOICE_POLISH_MODES, type VoiceConfig, type VoiceLLMMode, type VoicePolishEvent, type VoicePolishMode, type VoicePolishRequest, type VoiceTranscribeOptions, type VoiceTranscript, type WireBlockDelta, type WireBlockDeltaPayload, type WireBlockKind, type WireBlockStart, type WireBlockStatus, type WireBlockStop, type WireCustomEvent, type WireErrorEvent, type WireEvent, type WireInputArgDelta, type WireInputDelta, type WireKeepalive, type WireMessageStart, type WireMessageStop, type WireOutputDelta, type WireRetryEvent, type WireSignatureDelta, type WireStallWarning, type WireStatusDelta, type WireStopReason, type WireTextDelta, type WireThinkingDelta, type WorkspaceReadyPayload, generateId, isEmbeddedResource, isToolImageStub, isToolOutputStub, isVoiceLLMMode, isVoicePolishMode, mapSseToChat, parseEmbeddedResource, parseVoicePolishFrame, replayEvents, streamJobSSE, translateDelta };
|
|
2856
|
+
export { type ActiveJob, type AgentCapability, type AgentIdentity, type AgentInfo, type AgentStatus, type AssetCreatedPayload, type AstralformApiKeyConfig, AstralformClient, type AstralformConfig, AstralformError, type AstralformUserTokenConfig, type AttachmentStagedPayload, AuthenticationError, type AvailableRepositories, type AvailableRepository, type BlockDeltaPayload, CONVERSATION_PAGE_SIZE, type ChatEvent, ChatEventType, type ChatEventTypeValue, ChatSession, type ChatStorage, type ChatStreamEvent, type ChatStreamRequest, type CodeGroupMembership, type CodeProject, ConnectionError, type ContextUpdatePayload, type ContextWarningPayload, type Conversation, type ConversationAsset, type ConversationEvent, type ConversationGroup, type ConversationJob, type ConversationJobAttachment, type DesktopStreamPayload, type EffortRung, type EmbeddedResource, type FeedbackRequest, type FeedbackResponse, InMemoryStorage, type JobCreateResponse, type JobStatus, type JobSummary, type JobsPage, LLMNotConfiguredError, type MemoryProviderErrorPayload, type MemoryRecallPayload, type MemoryRecord, type MemoryUpdatePayload, type Message, type MessagesPage, type ModelChoiceOptions, type ModelOption, type MyToolGrantsPage, type NestedLlmUsagePayload, type NoteUpdatePayload, type PlanUpdatePayload, type PromptSuggestionPayload, type ProtocolAdapter, ProtocolRegistry, RateLimitError, type RateLimitErrorDetails, type RawSseEvent, type ReasoningEffort, type SendOptions, ServerError, type SendOptions$1 as SessionSendOptions, type SkillInfo, type SlashCommand, type SlashCommandSurface, StreamAbortedError, type StreamJobSSEOptions, StreamManager, type StreamManagerEvent, type StreamState, type SubagentStartPayload, type SubagentStopPayload, type TaskStatus, type TeamAgentSummary, type TeamSummary, type ThinkingDescriptor, type ThinkingRungOption, type TitleGeneratedPayload, type TodoItem, type TodoUpdatePayload, type ToolApprovalDecision, type ToolApprovalGrantedPayload, type ToolApprovalRequest, type ToolApprovalRequestedPayload, type ToolApprovalScope, type ToolCallRequest, type ToolDefinition, type ToolGrant, type ToolHandler, type ToolHarnessWarningPayload, type ToolImageMode, type ToolImageStub, type ToolOutputMode, type ToolOutputStub, type ToolProgressPayload, ToolRegistry, type ToolResult, type ToolResultRequest, type ToolSource, type TurnUsage, type UIComponentsConfig, type UserUnavailablePayload, VOICE_POLISH_MODES, type VoiceConfig, type VoiceLLMMode, type VoicePolishEvent, type VoicePolishMode, type VoicePolishRequest, type VoiceTranscribeOptions, type VoiceTranscript, type WireBlockDelta, type WireBlockDeltaPayload, type WireBlockKind, type WireBlockStart, type WireBlockStatus, type WireBlockStop, type WireCustomEvent, type WireErrorEvent, type WireEvent, type WireInputArgDelta, type WireInputDelta, type WireKeepalive, type WireMessageStart, type WireMessageStop, type WireOutputDelta, type WireRetryEvent, type WireSignatureDelta, type WireStallWarning, type WireStatusDelta, type WireStopReason, type WireTextDelta, type WireThinkingDelta, type WorkspaceReadyPayload, generateId, isEmbeddedResource, isToolImageStub, isToolOutputStub, isVoiceLLMMode, isVoicePolishMode, mapSseToChat, parseEmbeddedResource, parseVoicePolishFrame, replayEvents, streamJobSSE, translateDelta };
|
package/dist/index.js
CHANGED
|
@@ -447,6 +447,79 @@ var AstralformClient = class {
|
|
|
447
447
|
`/v1/code/projects/${encodeURIComponent(owner)}/${encodeURIComponent(repo)}`
|
|
448
448
|
);
|
|
449
449
|
}
|
|
450
|
+
},
|
|
451
|
+
/**
|
|
452
|
+
* Code groups: a user-named container under one repository, for a feature
|
|
453
|
+
* whose work outlives a single session. Its sessions share one plan and one
|
|
454
|
+
* set of notes, so what one writes the others read.
|
|
455
|
+
*
|
|
456
|
+
* A group is a LABEL, not a binding — unlike a task's project, which is
|
|
457
|
+
* written once on the first turn. A task may join, move between, or leave
|
|
458
|
+
* groups at any time, and a deleted group's sessions survive as ungrouped.
|
|
459
|
+
*
|
|
460
|
+
* The server enforces three things worth knowing before you render a
|
|
461
|
+
* failure: a group that is not this user's answers `404` (never `403`, so a
|
|
462
|
+
* group id cannot be probed); filing a task into a group under a DIFFERENT
|
|
463
|
+
* repository than the task's answers `409`; and the group's plan and notes
|
|
464
|
+
* are deleted with the group, while each session keeps its own.
|
|
465
|
+
*/
|
|
466
|
+
groups: {
|
|
467
|
+
/**
|
|
468
|
+
* This user's groups, oldest first. Pass a repository to narrow to one
|
|
469
|
+
* repository's — the composer's picker does; the sidebar asks once and
|
|
470
|
+
* nests them itself.
|
|
471
|
+
*/
|
|
472
|
+
list: async (repository) => {
|
|
473
|
+
const query = repository ? `?repository=${encodeURIComponent(repository)}` : "";
|
|
474
|
+
const raw = await this.get(`/v1/code/groups${query}`);
|
|
475
|
+
return raw.map((g) => camelizeKeys(g));
|
|
476
|
+
},
|
|
477
|
+
/**
|
|
478
|
+
* Create a group under a repository. The repository goes through the same
|
|
479
|
+
* normaliser the Projects surface uses, so a pasted GitHub URL is accepted
|
|
480
|
+
* and anything that is not `owner/repo` is refused.
|
|
481
|
+
*/
|
|
482
|
+
create: async (repository, title) => {
|
|
483
|
+
const raw = await this.post("/v1/code/groups", { repository, title });
|
|
484
|
+
return camelizeKeys(raw);
|
|
485
|
+
},
|
|
486
|
+
/** Rename a group. A group that is not this user's answers `404`. */
|
|
487
|
+
rename: async (groupId, title) => {
|
|
488
|
+
const raw = await this.patch(`/v1/code/groups/${encodeURIComponent(groupId)}`, { title });
|
|
489
|
+
return camelizeKeys(raw);
|
|
490
|
+
},
|
|
491
|
+
/**
|
|
492
|
+
* Delete a group. Its tasks survive and become ungrouped, each keeping its
|
|
493
|
+
* own plan and notes; the group's SHARED documents are deleted with it.
|
|
494
|
+
*/
|
|
495
|
+
remove: async (groupId) => {
|
|
496
|
+
await this.del(`/v1/code/groups/${encodeURIComponent(groupId)}`);
|
|
497
|
+
},
|
|
498
|
+
/**
|
|
499
|
+
* File a task into a group. Idempotent — filing an already-filed task
|
|
500
|
+
* again is the same state, not an error. Refused with `409` when the task
|
|
501
|
+
* belongs to a different repository than the group, because it would
|
|
502
|
+
* render nowhere in the sidebar.
|
|
503
|
+
*/
|
|
504
|
+
assign: async (groupId, conversationId) => {
|
|
505
|
+
const raw = await this.post(
|
|
506
|
+
`/v1/code/groups/${encodeURIComponent(groupId)}/tasks/${encodeURIComponent(conversationId)}`,
|
|
507
|
+
void 0
|
|
508
|
+
);
|
|
509
|
+
return camelizeKeys(raw);
|
|
510
|
+
},
|
|
511
|
+
/**
|
|
512
|
+
* Take a task out of its group. The task and its documents are untouched.
|
|
513
|
+
*
|
|
514
|
+
* Deliberately not strict about WHICH group the task is in: a task that is
|
|
515
|
+
* in a different one (or in none) already satisfies "this task should not
|
|
516
|
+
* be grouped", so the call clears it rather than refusing.
|
|
517
|
+
*/
|
|
518
|
+
unassign: async (groupId, conversationId) => {
|
|
519
|
+
await this.del(
|
|
520
|
+
`/v1/code/groups/${encodeURIComponent(groupId)}/tasks/${encodeURIComponent(conversationId)}`
|
|
521
|
+
);
|
|
522
|
+
}
|
|
450
523
|
}
|
|
451
524
|
};
|
|
452
525
|
if (isApiKeyConfig(config)) {
|