shennian 0.4.69 → 0.4.71
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/publish-build-manifest.json +125 -70
- package/dist/src/agent-env.js +4 -4
- package/dist/src/agents/adapter.d.ts +7 -3
- package/dist/src/agents/auth-status.d.ts +4 -0
- package/dist/src/agents/auth-status.js +2 -0
- package/dist/src/agents/codex-protocol.d.ts +103 -0
- package/dist/src/agents/codex-protocol.js +3 -0
- package/dist/src/agents/codex-runtime.d.ts +91 -0
- package/dist/src/agents/codex-runtime.js +14 -0
- package/dist/src/agents/codex.d.ts +15 -91
- package/dist/src/agents/codex.js +2 -17
- package/dist/src/agents/command-spec.js +4 -3
- package/dist/src/agents/detect.js +1 -1
- package/dist/src/agents/manager.d.ts +4 -3
- package/dist/src/agents/manager.js +4 -4
- package/dist/src/agents/opencode.d.ts +4 -0
- package/dist/src/agents/opencode.js +1 -1
- package/dist/src/commands/agent-readiness.d.ts +17 -0
- package/dist/src/commands/agent-readiness.js +2 -0
- package/dist/src/commands/agent.js +2 -2
- package/dist/src/commands/daemon-instance-lock.js +1 -1
- package/dist/src/commands/daemon-process.d.ts +1 -0
- package/dist/src/commands/daemon-process.js +1 -1
- package/dist/src/commands/daemon-service-spec.d.ts +28 -0
- package/dist/src/commands/daemon-service-spec.js +1 -0
- package/dist/src/commands/daemon-start-wait.d.ts +1 -1
- package/dist/src/commands/daemon-start-wait.js +1 -1
- package/dist/src/commands/daemon-state.d.ts +57 -0
- package/dist/src/commands/daemon-state.js +1 -0
- package/dist/src/commands/daemon-windows.d.ts +8 -0
- package/dist/src/commands/daemon-windows.js +10 -10
- package/dist/src/commands/daemon.d.ts +4 -64
- package/dist/src/commands/daemon.js +13 -13
- package/dist/src/commands/upgrade.js +1 -1
- package/dist/src/daemon-ipc/agent-readiness.d.ts +14 -0
- package/dist/src/daemon-ipc/agent-readiness.js +1 -0
- package/dist/src/daemon-ipc/control.d.ts +1 -1
- package/dist/src/daemon-ipc/control.js +1 -1
- package/dist/src/index.js +3 -3
- package/dist/src/native-fusion/local-repository.d.ts +6 -1
- package/dist/src/native-fusion/local-repository.js +2 -2
- package/dist/src/native-fusion/service.d.ts +2 -0
- package/dist/src/native-fusion/service.js +2 -2
- package/dist/src/native-fusion/source-visibility-audit.d.ts +16 -0
- package/dist/src/native-fusion/source-visibility-audit.js +1 -0
- package/dist/src/native-fusion/source-visibility.d.ts +25 -0
- package/dist/src/native-fusion/source-visibility.js +1 -0
- package/dist/src/native-fusion/state.d.ts +1 -0
- package/dist/src/native-fusion/state.js +2 -2
- package/dist/src/native-fusion/types.d.ts +5 -0
- package/dist/src/room/managed-room-binding.d.ts +2 -0
- package/dist/src/room/managed-room-binding.js +1 -1
- package/dist/src/room/room-binding-client.d.ts +1 -0
- package/dist/src/room/room-binding-client.js +1 -1
- package/dist/src/runtime-distribution.d.ts +13 -0
- package/dist/src/runtime-distribution.js +1 -0
- package/dist/src/security/managed-agent-policy.d.ts +7 -0
- package/dist/src/security/managed-agent-policy.js +1 -1
- package/dist/src/session/handlers/agent-workspace-validation.d.ts +1 -0
- package/dist/src/session/handlers/agent-workspace-validation.js +1 -1
- package/dist/src/session/handlers/agents.d.ts +7 -1
- package/dist/src/session/handlers/agents.js +1 -1
- package/dist/src/session/handlers/chat-context.d.ts +31 -0
- package/dist/src/session/handlers/chat-context.js +1 -0
- package/dist/src/session/handlers/chat-events.d.ts +1 -1
- package/dist/src/session/handlers/chat-events.js +2 -2
- package/dist/src/session/handlers/chat-session-lifecycle.d.ts +2 -2
- package/dist/src/session/handlers/chat-session-lifecycle.js +1 -1
- package/dist/src/session/handlers/chat.d.ts +3 -29
- package/dist/src/session/handlers/chat.js +1 -1
- package/dist/src/session/manager.js +2 -2
- package/dist/src/session/queue-helpers.js +2 -2
- package/dist/src/session/queue-message.d.ts +2 -0
- package/dist/src/session/queue.d.ts +7 -1
- package/dist/src/session/queue.js +1 -1
- package/dist/src/session/queued-chat-dispatch.d.ts +4 -1
- package/dist/src/session/queued-chat-dispatch.js +1 -1
- package/dist/src/session/store.d.ts +4 -2
- package/dist/src/session/store.js +2 -2
- package/dist/src/session/types.d.ts +1 -0
- package/dist/src/upgrade/engine.js +2 -2
- package/dist/src/upgrade/scheduler.js +1 -1
- package/dist/src/upgrade/updater-launcher.js +3 -3
- package/node_modules/@shennian/wire/dist/room.d.ts +2 -0
- package/node_modules/@shennian/wire/dist/session-sync.d.ts +2 -1
- package/node_modules/@shennian/wire/dist/session.d.ts +19 -1
- package/node_modules/@shennian/wire/dist/session.js +8 -0
- package/package.json +1 -1
|
@@ -279,6 +279,8 @@ export type NianSession = {
|
|
|
279
279
|
agentType: AgentType;
|
|
280
280
|
/** Missing on legacy records/clients and normalized to standard, except legacy agentType=manager. */
|
|
281
281
|
sessionMode?: SessionMode;
|
|
282
|
+
/** Internal orchestration stays out of personal discovery; linked details remain readable. */
|
|
283
|
+
nativeSessionVisibility?: 'user' | 'internal';
|
|
282
284
|
managerConfig?: ManagerConfig | null;
|
|
283
285
|
agentSessionId: string | null;
|
|
284
286
|
sourceMode?: NativeSessionSourceMode | null;
|
|
@@ -336,7 +338,7 @@ export type NianSession = {
|
|
|
336
338
|
activity?: SessionActivitySnapshot | null;
|
|
337
339
|
externalChannel?: ExternalChannelSessionStatus | null;
|
|
338
340
|
};
|
|
339
|
-
export type SessionListProjection = Pick<NianSession, 'id' | 'machineId' | 'userId' | 'agentType' | 'sessionMode' | 'managerConfig' | 'agentSessionId' | 'modelId' | 'managerDefaultWorkerAgentType' | 'managerDefaultWorkerModelId' | 'title' | 'titleSource' | 'titleRevision' | 'titleLockedByUser' | 'titleOriginEventId' | 'status' | 'workDir' | 'lastMessagePreview' | 'lastMessagePreviewMessageId' | 'lastMessagePreviewAt' | 'lastVisibleEventAt' | 'bodyStorageMode' | 'bodyRevision' | 'indexRevision' | 'dataEpoch' | 'firstAvailableSeq' | 'visibleMessageCount' | 'lastVisibleMessageId' | 'attentionCount' | 'lastAttentionId' | 'lastBodyCommittedAt' | 'deletionRevision' | 'lastActivityAt' | 'createdAt' | 'updatedAt' | 'deletedAt' | 'machineName' | 'ownerName' | 'ownerPhone' | 'ownerEmail' | 'canManage' | 'sharedMachineSession' | 'activity' | 'externalChannel'>;
|
|
341
|
+
export type SessionListProjection = Pick<NianSession, 'id' | 'machineId' | 'userId' | 'agentType' | 'sessionMode' | 'nativeSessionVisibility' | 'managerConfig' | 'agentSessionId' | 'modelId' | 'managerDefaultWorkerAgentType' | 'managerDefaultWorkerModelId' | 'title' | 'titleSource' | 'titleRevision' | 'titleLockedByUser' | 'titleOriginEventId' | 'status' | 'workDir' | 'lastMessagePreview' | 'lastMessagePreviewMessageId' | 'lastMessagePreviewAt' | 'lastVisibleEventAt' | 'bodyStorageMode' | 'bodyRevision' | 'indexRevision' | 'dataEpoch' | 'firstAvailableSeq' | 'visibleMessageCount' | 'lastVisibleMessageId' | 'attentionCount' | 'lastAttentionId' | 'lastBodyCommittedAt' | 'deletionRevision' | 'lastActivityAt' | 'createdAt' | 'updatedAt' | 'deletedAt' | 'machineName' | 'ownerName' | 'ownerPhone' | 'ownerEmail' | 'canManage' | 'sharedMachineSession' | 'activity' | 'externalChannel'>;
|
|
340
342
|
export type ChatSendParams = PersonalSyncIdentity & {
|
|
341
343
|
sessionId: string;
|
|
342
344
|
text: string;
|
|
@@ -382,6 +384,12 @@ export type QueuedChatMessage = PersonalSyncIdentity & {
|
|
|
382
384
|
replyTarget?: string | null;
|
|
383
385
|
createdAt: string;
|
|
384
386
|
updatedAt: string;
|
|
387
|
+
/** Presentation state for the shared pending-message panel. */
|
|
388
|
+
pendingState?: 'waiting' | 'submitting' | 'provider_queued';
|
|
389
|
+
/** Whether the current client may delete this item before Provider claim. */
|
|
390
|
+
canDelete?: boolean;
|
|
391
|
+
/** Whether the daemon currently has a truthful immediate-send path. */
|
|
392
|
+
canPromote?: boolean;
|
|
385
393
|
};
|
|
386
394
|
export type ChatQueueSnapshot = PersonalSyncIdentity & {
|
|
387
395
|
sessionId: string;
|
|
@@ -389,6 +397,8 @@ export type ChatQueueSnapshot = PersonalSyncIdentity & {
|
|
|
389
397
|
pending: QueuedChatMessage[];
|
|
390
398
|
/** Owner-authored messages that may be deleted or promoted by the current UI. */
|
|
391
399
|
controllablePending?: QueuedChatMessage[];
|
|
400
|
+
/** All owner-authored pending items that belong in the shared composer panel. */
|
|
401
|
+
visiblePending?: QueuedChatMessage[];
|
|
392
402
|
};
|
|
393
403
|
export type ChatEnqueueParams = ChatSendParams & {
|
|
394
404
|
queueMessageId?: string;
|
|
@@ -439,3 +449,11 @@ export type FsReadParams = {
|
|
|
439
449
|
path: string;
|
|
440
450
|
rootPath?: string;
|
|
441
451
|
};
|
|
452
|
+
/** Visibility is separate from access: an Owner can still open linked internal details. */
|
|
453
|
+
export declare function isInternalSession(session: {
|
|
454
|
+
id: string;
|
|
455
|
+
nativeSessionVisibility?: string | null;
|
|
456
|
+
agentType?: string;
|
|
457
|
+
sessionMode?: string | null;
|
|
458
|
+
agentIdentityId?: string | null;
|
|
459
|
+
}): boolean;
|
|
@@ -50,3 +50,11 @@ export function filterAvailableAgentInfos(agents) {
|
|
|
50
50
|
}
|
|
51
51
|
return filtered;
|
|
52
52
|
}
|
|
53
|
+
/** Visibility is separate from access: an Owner can still open linked internal details. */
|
|
54
|
+
export function isInternalSession(session) {
|
|
55
|
+
return session.nativeSessionVisibility === 'internal'
|
|
56
|
+
|| session.id.startsWith('sess_worker_')
|
|
57
|
+
|| session.agentType === 'manager'
|
|
58
|
+
|| session.sessionMode === 'manager'
|
|
59
|
+
|| Boolean(session.agentIdentityId);
|
|
60
|
+
}
|