@adhdev/mesh-shared 1.0.82-rc.33 → 1.0.82-rc.35

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.
@@ -14,7 +14,7 @@
14
14
  * Assistant-specific tools remain separate from mesh tools. Driver discovery
15
15
  * (list/describe) is shared across all three modes; invoke remains Worker-only.
16
16
  */
17
- export declare const ASSISTANT_TOOLS: readonly ["projects", "environment", "assistant_action", "project_watch", "project_status", "project_send", "project_read", "project_add", "project_attach_remote", "discover_repos", "memory", "skill_view", "skill_manage", "project_note", "launch_defaults", "launch_defaults_set", "driver_list", "driver_describe"];
17
+ export declare const ASSISTANT_TOOLS: readonly ["projects", "environment", "assistant_action", "project_watch", "project_status", "project_send", "project_read", "project_add", "project_attach_remote", "discover_repos", "memory", "skill_view", "skill_manage", "project_note", "launch_defaults", "launch_defaults_set", "driver_list", "driver_describe", "artifact_list", "artifact_read", "decision_answer", "decision_request"];
18
18
  export type AssistantTool = typeof ASSISTANT_TOOLS[number];
19
19
  export declare function isAssistantTool(value: unknown): value is AssistantTool;
20
20
  /** Daemon verb names (§4.4 table + the five verbs below it). */
@@ -39,6 +39,12 @@ export declare const ASSISTANT_VERB: {
39
39
  readonly projectNote: "assistant_project_note";
40
40
  readonly launchDefaults: "assistant_launch_defaults";
41
41
  readonly launchDefaultsSet: "assistant_launch_defaults_set";
42
+ readonly artifactList: "assistant_artifact_list";
43
+ readonly artifactRead: "assistant_artifact_read";
44
+ /** Owner-decision inbox (structured-missions design 2026-10-28 §6.3): the owner's words recorded as answers. */
45
+ readonly decisionAnswer: "assistant_decision_answer";
46
+ /** Register a plain-text question a coordinator put to the owner as a decision item (§5.2). */
47
+ readonly decisionRequest: "assistant_decision_request";
42
48
  readonly launch: "launch_assistant";
43
49
  readonly pendingRelays: "assistant_pending_relays";
44
50
  readonly stagedResolve: "assistant_staged_resolve";
@@ -90,9 +96,10 @@ export declare const ASSISTANT_REMOTE_FOLLOW_COMMAND: "assistant_remote_follow";
90
96
  * `assistant_remote_project` when the host's `assistantRemoteAccess` ACL is active.
91
97
  * `note`, `terminal`, and `inventory` remain strictly roster-member-only.
92
98
  */
93
- export declare const ASSISTANT_FOLLOWER_ALLOWED_OPS: readonly ["status", "read", "poll", "report", "send"];
99
+ export declare const ASSISTANT_FOLLOWER_ALLOWED_OPS: readonly ["status", "read", "poll", "report", "send", "artifact_list", "artifact_read", "decision_list", "decision_answer", "decision_request"];
94
100
  export type AssistantFollowerAllowedOp = typeof ASSISTANT_FOLLOWER_ALLOWED_OPS[number];
95
101
  export declare function isAssistantFollowerAllowedOp(value: unknown): value is AssistantFollowerAllowedOp;
102
+ export declare function followerOpPermitted(op: string, allowedOps: readonly AssistantFollowerAllowedOp[]): boolean;
96
103
  /**
97
104
  * Host-authoritative narrow project ACL persisted on the hosting daemon's
98
105
  * `LocalMeshEntry` in `meshes.json`. Revocation increments `grantRevision`
@@ -108,6 +115,7 @@ export interface AssistantRemoteAccessBinding {
108
115
  status: 'active' | 'revoked';
109
116
  allowedOps: readonly AssistantFollowerAllowedOp[];
110
117
  allowCoordinatorLaunch?: boolean;
118
+ allowArtifactRead?: boolean;
111
119
  grantedAt: number;
112
120
  revokedAt?: number;
113
121
  }
@@ -144,6 +152,7 @@ export interface FollowedRemoteProjectEntry {
144
152
  bindingRevision: number;
145
153
  grantRevision: number;
146
154
  allowCoordinatorLaunch?: boolean;
155
+ allowArtifactRead?: boolean;
147
156
  state: FollowedRemoteProjectState;
148
157
  followedAt: number | string;
149
158
  updatedAt: number | string;
@@ -173,6 +182,7 @@ export interface RemoteProjectCatalogItem {
173
182
  sanitizedRepoIdentity: string | null;
174
183
  coordinatorState?: 'none' | 'idle' | 'working' | 'waiting' | string;
175
184
  allowCoordinatorLaunch?: boolean;
185
+ allowArtifactRead?: boolean;
176
186
  capabilities: {
177
187
  status: true;
178
188
  read: true;
@@ -181,6 +191,7 @@ export interface RemoteProjectCatalogItem {
181
191
  send: true;
182
192
  coordinatorPresent?: boolean;
183
193
  allowCoordinatorLaunch?: boolean;
194
+ allowArtifactRead?: boolean;
184
195
  };
185
196
  observedAt: number | string;
186
197
  }
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Opt-in "answer a decision from the push notification" relay (mission 4ae3edf2, owner 2026-10-29).
3
+ *
4
+ * ★ A deliberate, narrow exception to "no dashboard command relay over server WS" (CLAUDE.md).
5
+ * With the user's opt-in setting ON and no dashboard window open, the notification's
6
+ * recommended-option action is POSTed by the service worker to the server, which forwards it to the
7
+ * owning daemon over the existing daemon WS as ONE fixed command. What crosses the server is exactly
8
+ * `{ meshId, itemId, optionId }` (+ the single-use answer token that authorizes it) — never the
9
+ * question, context or free text. Shared so the server's frame and the daemon's ingress cannot drift.
10
+ */
11
+ /** Daemon command the server sends; its only accepted source is {@link DECISION_PUSH_RELAY_SOURCE}. */
12
+ export declare const DECISION_PUSH_RELAY_COMMAND = "mission_decision_push_relay_answer";
13
+ /** Command source the server stamps on the relayed frame (never settable by REST/API callers). */
14
+ export declare const DECISION_PUSH_RELAY_SOURCE = "push_relay";
15
+ /** The complete relayed payload — ids only. */
16
+ export type DecisionPushRelayPayload = {
17
+ meshId: string;
18
+ itemId: string;
19
+ optionId: string;
20
+ };
package/dist/index.d.ts CHANGED
@@ -40,9 +40,12 @@ export * from './session-launch';
40
40
  export * from './turn-ipc';
41
41
  export * from './path-ownership';
42
42
  export * from './mission-brief';
43
+ export * from './mission-items';
44
+ export * from './decision-push-relay';
43
45
  export * from './keyed-doc-delta';
44
46
  export * from './provider-approval';
45
47
  export * from './provider-question';
46
48
  export * from './launch-defaults';
47
49
  export * from './role-launch';
48
50
  export * from './task-source-phase';
51
+ export * from './relay-reprobe';