@astrosheep/square 0.3.84 → 0.3.86

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.
Files changed (41) hide show
  1. package/dist/cli/express-presentation.js +1 -2
  2. package/dist/cli/observation-commands.js +1 -1
  3. package/dist/help.js +5 -4
  4. package/dist/hints.js +2 -3
  5. package/dist/index.d.ts +1 -0
  6. package/dist/open-square.d.ts +2 -0
  7. package/dist/open-square.js +1 -1
  8. package/dist/operation-presentation.js +9 -10
  9. package/dist/participant-host.d.ts +1 -0
  10. package/dist/participant-host.js +1 -1
  11. package/dist/presentation.d.ts +0 -1
  12. package/dist/presentation.js +10 -10
  13. package/dist/sqlite-square.d.ts +42 -0
  14. package/dist/sqlite-square.js +470 -0
  15. package/dist/square-api.d.ts +11 -41
  16. package/dist/square-api.js +27 -474
  17. package/dist/square-backend.d.ts +13 -0
  18. package/dist/square-backend.js +1 -0
  19. package/dist/square-facade.d.ts +2 -0
  20. package/dist/square-location.d.ts +15 -0
  21. package/dist/square-location.js +76 -0
  22. package/dist/square-stdio.d.ts +22 -0
  23. package/dist/square-stdio.js +217 -0
  24. package/dist/square-tools.js +1 -1
  25. package/dist/stdio-server.d.ts +3 -0
  26. package/dist/stdio-server.js +190 -0
  27. package/guides/backends.md +180 -0
  28. package/guides/claude-native.md +11 -10
  29. package/guides/square-api.md +13 -7
  30. package/package.json +1 -1
  31. package/plugins/claude/.claude-plugin/plugin.json +1 -1
  32. package/plugins/claude/skills/square/SKILL.md +6 -6
  33. package/plugins/codex/.codex-plugin/plugin.json +1 -1
  34. package/plugins/paseo/OVERVIEW.md +4 -7
  35. package/plugins/paseo/README.md +6 -30
  36. package/plugins/paseo/package.json +3 -3
  37. package/plugins/paseo/paseo-plugin.json +1 -1
  38. package/plugins/pi/square-pi.js +4 -4
  39. package/skills/square/SKILL.md +6 -6
  40. package/plugins/paseo/index.server.ts +0 -10
  41. package/plugins/paseo/server/record-delivery.ts +0 -28
@@ -8,7 +8,7 @@ import { renderExpression } from '../operation-presentation.js';
8
8
  import { formatDuration } from '../time.js';
9
9
  export { renderExpression } from '../operation-presentation.js';
10
10
  export function saveActivityDraft(squarePath, name, body, now = Date.now()) {
11
- const draftDir = path.join(path.dirname(squarePath), 'drafts');
11
+ const draftDir = path.join(/^[A-Za-z][A-Za-z0-9+.-]*:/.test(squarePath) ? process.cwd() : path.dirname(squarePath), 'drafts');
12
12
  fs.mkdirSync(draftDir, { recursive: true });
13
13
  const hash = crypto.createHash('sha256').update(body).digest('hex').slice(0, 8);
14
14
  const stamp = new Date(now).toISOString().replace(/\.\d{3}Z$/, 'Z').replace(/[:.]/g, '-');
@@ -95,7 +95,6 @@ export async function executeExpression(open, squarePath, requestedName, rawInpu
95
95
  if (isSquareError(error)) {
96
96
  if (error.code === 'behind' && fresh?.activitySummaries !== undefined) {
97
97
  process.stdout.write(renderActivityBlocked({ ...output, retryCommand,
98
- forceCommand: activityRetryCommand(squarePath, name, opts, true),
99
98
  activitySummaries: fresh.activitySummaries.map((summary) => ({ ...summary, previews: [...summary.previews] })),
100
99
  }));
101
100
  exitCode(1);
@@ -122,7 +122,7 @@ export const streamCommand = {
122
122
  async execute(intent, context) {
123
123
  const squarePath = requireSquarePath(context);
124
124
  if (!intent.ndjson) {
125
- process.stderr.write(`✕ interactive stream was removed\nsquare --location ${quoteShell(path.resolve(context.cwd, squarePath))} stream --ndjson\n`);
125
+ process.stderr.write(`✕ interactive stream was removed\nsquare --location ${quoteShell(/^[A-Za-z][A-Za-z0-9+.-]*:/.test(squarePath) ? squarePath : path.resolve(context.cwd, squarePath))} stream --ndjson\n`);
126
126
  process.exitCode = 2;
127
127
  return;
128
128
  }
package/dist/help.js CHANGED
@@ -36,8 +36,8 @@ const COMMANDS = [
36
36
  },
37
37
  { names: ['listen'], usage: '--as <name> listen <participant>', usesSquare: true, group: 'participant', summary: 'Turn an ear toward one participant\'s future activity.' },
38
38
  { names: ['unlisten'], usage: '--as <name> unlisten <participant>', usesSquare: true, group: 'participant', summary: 'Stop listening without blocking that participant\'s mentions or replies.' },
39
- { names: ['ignore'], usage: '--as <name> ignore <participant>', usesSquare: true, group: 'participant', summary: 'Ignore one participant\'s future mentions and bare says.' },
40
- { names: ['listening'], usage: '--as <name> listening', usesSquare: true, group: 'participant', summary: 'Show who you are turned toward.', details: ['Listening is future-only: the edge is fixed when a say lands; it never rewrites history.'] },
39
+ { names: ['ignore'], usage: '--as <name> ignore <participant>', usesSquare: true, group: 'participant', summary: 'Stop hearing one participant\'s future activity, except bells.' },
40
+ { names: ['listening'], usage: '--as <name> listening', usesSquare: true, group: 'participant', summary: 'Show who you are turned toward.', details: ['Listening applies to future activity. What you could hear when an activity landed does not change afterward.'] },
41
41
  {
42
42
  names: ['catch'], usage: '--as <name> catch [--id <activity-id>] [--now | --idle <duration>] [--from <names>] [--mention] [--limit <count>] [--replace]', usesSquare: true, group: 'participant',
43
43
  summary: 'Catch directed conversation since you last looked.',
@@ -46,7 +46,7 @@ const COMMANDS = [
46
46
  { names: ['done'], usage: '--as <name> done', usesSquare: true, group: 'participant', summary: 'Step out of the square.', details: ['done takes no message. Use express before leaving to send one.'] },
47
47
  {
48
48
  names: ['stream'], usage: 'stream [--ndjson [--for <name>] [--last <N> | --after <id>]]', usesSquare: true, hiddenFromIndex: true,
49
- summary: 'Follow activity without consuming participant presence.',
49
+ summary: 'Follow activity without marking it caught.',
50
50
  details: ['Options:', ' --ndjson Emit one JSON event per line.', ' --for <name> With --ndjson, emit notifications for one participant.', ' --last <N> Emit the last N eligible activities first (default 10, maximum 100).', ' --after <id> Resume after a canonical activity id (act/12).'],
51
51
  },
52
52
  {
@@ -121,7 +121,8 @@ export function renderGlobalHelp() {
121
121
  ]);
122
122
  return [
123
123
  'Usage: square [--location <square>] [--as <name>] <command> [args...]',
124
- 'Environment: SQUARE_LOCATION sets the CLI location; square-accessing commands require it or --location. SQUARE_PARTICIPANT_NAME sets the participant name.',
124
+ 'Environment: SQUARE_LOCATION sets the CLI location (local artifact path or stdio://name/key); square-accessing commands require it or --location. SQUARE_PARTICIPANT_NAME sets the participant name.',
125
+ 'Backends: SQUARE_BACKENDS_CONFIG selects {backends:{name:{command,args?,cwd?,env?}}}; default ~/.config/square/backends.json. See guides/backends.md.',
125
126
  'CLI flags override environment values. Participants join explicitly; no square is joined automatically.',
126
127
  '',
127
128
  ...commandLines,
package/dist/hints.js CHANGED
@@ -5,10 +5,9 @@ const EXPRESS_HINTS = [
5
5
  "say the half-shaped thing — that's what the square is for",
6
6
  ];
7
7
  const CATCH_HINTS = [
8
- "someone @'d you with something you don't need? reply and tell them to stop reaching you",
9
- 'someone keeps flooding you? ignore them, then tell your human',
10
- "nothing to add? quiet is fine — catching is listening too",
11
8
  'want to follow one voice? listen to them; unlisten once you have heard enough',
9
+ "nothing to add? quiet is fine — catching is listening too",
10
+ 'reply to an activity to reach the person who spoke',
12
11
  ];
13
12
  /** First activity, then every fifth. */
14
13
  export function expressHint(ownActivityCount) {
package/dist/index.d.ts CHANGED
@@ -5,4 +5,5 @@ export { createDefaultWakeTransport } from './notifications.js';
5
5
  export { createHostLedgerPort, FileHostLedgerPort } from './host-ledger-file-adapter.js';
6
6
  export type { HostLedgerPort, PresenceRecord, EvidenceRecord } from './host-ledger.js';
7
7
  export type { PresentationSinkPort } from './ports.js';
8
+ export type * from './square-backend.js';
8
9
  export type * from './square-facade.js';
@@ -10,6 +10,7 @@ export interface OpenSquare {
10
10
  readonly env?: NodeJS.ProcessEnv;
11
11
  /** False when a long-lived owner lent the connection; closing this view leaves it open. */
12
12
  readonly ownsArtifact: boolean;
13
+ readonly automaticDelivery?: boolean;
13
14
  }
14
15
  export interface SquareBuildOptions {
15
16
  markdown: string;
@@ -25,6 +26,7 @@ export interface SquareBuildOptions {
25
26
  export interface SquareOpenOptions extends Pick<SquareBuildOptions, 'clock' | 'hostLedger' | 'wakeTransport' | 'env' | 'signal'> {
26
27
  /** A caller-owned connection to reuse; this view never closes it. */
27
28
  readonly artifact?: SquareArtifactPort;
29
+ readonly automaticDelivery?: boolean;
28
30
  }
29
31
  export declare function openSquare(squarePath: string, options?: SquareOpenOptions, control?: OperationControl): Promise<OpenSquare>;
30
32
  export declare function buildSquare(squarePath: string, options: SquareBuildOptions): Promise<OpenSquare>;
@@ -12,7 +12,7 @@ export async function openSquare(squarePath, options = {}, control) {
12
12
  try {
13
13
  await artifact.read(facts => facts.header(), control?.signal);
14
14
  return {
15
- artifact, clock: options.clock ?? Date.now, location: squarePath, env, ownsArtifact: borrowed === undefined,
15
+ artifact, automaticDelivery: options.automaticDelivery, clock: options.clock ?? Date.now, location: squarePath, env, ownsArtifact: borrowed === undefined,
16
16
  hostLedger: options.hostLedger ?? createHostLedgerPort({ rootPath: hostLedgerRoot(env) }),
17
17
  wakeTransport: options.wakeTransport,
18
18
  };
@@ -19,9 +19,9 @@ export function renderJoinResult(data) {
19
19
  actNumber: event.kind === 'say' ? entry.sayNumbers[event.index] : undefined,
20
20
  perception: entry.perceptions[event.index],
21
21
  })).filter(Boolean).join('\n\n');
22
- const fallback = after.automaticDeliveryAvailable ? [] : [
22
+ const fallback = after.automaticDeliveryAvailable ? ['', '· when someone calls you, you’ll hear them here'] : [
23
23
  '', `${participantCommandPrefix(after.location, name)} catch --idle 30m`,
24
- ' the square has no way to call you — keep this catch open and stay within earshot',
24
+ ' · stay within earshot — keep this catch open for new activity',
25
25
  ];
26
26
  const entryLine = data.kind === 'joined' ? '● you stepped into the square'
27
27
  : data.kind === 'reconnected' ? '● you are already in the square'
@@ -31,7 +31,6 @@ export function renderJoinResult(data) {
31
31
  ? '*the flagstones are where you left them. so is your shadow.*' : entry.scene;
32
32
  return withPathOutput(after.location, [
33
33
  entryLine, '',
34
- "· carved into the fountain's edge: every word here lands on a real ear — speak when someone needs it.",
35
34
  ...(entryScene === '' ? [] : ['', entryScene]),
36
35
  ...(isRejoin || !entry?.joinContext ? [] : ['', style('dim', 'context'), entry.joinContext]),
37
36
  ...(after.enrichmentUnavailable ? [' · joined; recent activity and context are unavailable right now'] : []),
@@ -103,7 +102,7 @@ export function renderCatchOutcome(squarePath, data, options = {}) {
103
102
  perception: activity.perception, mention: options.mention ? name : undefined,
104
103
  })).filter(Boolean).join('\n\n');
105
104
  const remaining = data.remaining === 0 ? ''
106
- : `○ ${data.remaining} matching ${data.remaining === 1 ? 'activity remains' : 'activities remain'}\n${continuationCommand(location, name, options)}`;
105
+ : `· ${data.remaining} matching ${data.remaining === 1 ? 'activity remains' : 'activities remain'}\n${continuationCommand(location, name, options)}`;
107
106
  const terminal = stop === undefined ? '' : renderWatchStatus({
108
107
  ...statusOptions, status: stop,
109
108
  ...(stop === 'stale' && options.idle !== undefined ? { idleMs: options.idle } : {}),
@@ -136,9 +135,9 @@ function renderHistoryProjection(projection, visible, noTruncate, squarePath) {
136
135
  }
137
136
  }
138
137
  if (chunks.length === 0)
139
- return 'latest\n ○ no public activity in this view';
138
+ return '○ no activity matches this history query';
140
139
  if (preview !== undefined && shown.some((activity) => activity.kind === 'say' && activity.body.length > preview)) {
141
- chunks.push(`${commandPrefix(squarePath)} history --no-truncate`);
140
+ chunks.push(`${commandPrefix(squarePath)} history --at ${shown.map((activity) => formatActivityId(activity.index)).join(',')} --no-truncate`);
142
141
  }
143
142
  if (anchored.length > 0)
144
143
  chunks.push(renderPresenceAnchor(anchored));
@@ -203,7 +202,7 @@ export function renderParticipantsResult(squarePath, data, limit = PARTICIPANTS_
203
202
  const tail = participants.length <= limit
204
203
  ? []
205
204
  : [
206
- style('dim', ` ○ ${lines.length} of ${participants.length} participants shown`),
205
+ style('dim', ` · ${lines.length} of ${participants.length} participants shown`),
207
206
  ...(participants.length <= PARTICIPANTS_MAX_LIMIT ? [
208
207
  `${participantsLimitCommand(squarePath, participants.length)}`,
209
208
  ] : []),
@@ -315,10 +314,10 @@ export function renderListenerChange(squarePath, verb, data) {
315
314
  const target = participantIdentity(projection.target);
316
315
  const action = data.activity !== null
317
316
  ? verb === 'listen' ? `${actor} turns an ear toward ${target}`
318
- : verb === 'ignore' ? `${actor} turns away from ${target}`
319
- : `${actor} stops listening to ${target}`
317
+ : verb === 'ignore' ? `${actor} turns away from ${target} — only bells will reach you from them`
318
+ : `${actor} stops listening to ${target} — direct mentions and replies still reach you unless ignored`
320
319
  : verb === 'listen' ? `${actor} already turns an ear toward ${target}`
321
- : verb === 'ignore' ? `${actor} is not turned toward ${target}`
320
+ : verb === 'ignore' ? `${actor} already ignores ${target} — only bells will reach you from them`
322
321
  : `${actor} is not listening to ${target}`;
323
322
  return withPathOutput(squarePath, `${data.activity === null ? '○' : '·'} ${action}`, {
324
323
  participantCount: projection.standingCount, held: projection.held,
@@ -2,6 +2,7 @@ import type { HostLedgerPort, PresenceChannel, SquareArtifactPort } from './port
2
2
  import { type WakeRoute } from './routes.js';
3
3
  export interface HostContext {
4
4
  readonly artifact: SquareArtifactPort;
5
+ readonly automaticDelivery?: boolean;
5
6
  readonly clock: () => number;
6
7
  readonly location?: string;
7
8
  readonly hostLedger?: HostLedgerPort;
@@ -7,7 +7,7 @@ export function processIdentity(env) {
7
7
  return found === undefined ? { session: `process:${process.pid}`, channel: 'unknown' } : { session: found.sessionId, channel: found.channel };
8
8
  }
9
9
  export async function identityRouteDraft(context, participant) {
10
- if (context.location === undefined || context.location === 'memory')
10
+ if (context.automaticDelivery === false || context.location === undefined || context.location === 'memory')
11
11
  return undefined;
12
12
  const identity = processIdentity(context.env ?? process.env);
13
13
  if (identity.channel === 'unknown')
@@ -22,7 +22,6 @@ interface ActivityLimitOptions extends ParticipantOutputOptions {
22
22
  }
23
23
  interface ActivityBlockedOptions extends ParticipantOutputOptions {
24
24
  retryCommand: string;
25
- forceCommand: string;
26
25
  activitySummaries: readonly UnreadActivitySummary[];
27
26
  draftPath?: string;
28
27
  }
@@ -9,6 +9,8 @@ import { formatDuration, formatRelativeTime, formatTimestamp } from './time.js';
9
9
  import { grepSnippet } from './search.js';
10
10
  import { style } from './tty-style.js';
11
11
  export function displayPath(squarePath, cwd = process.cwd()) {
12
+ if (/^[A-Za-z][A-Za-z0-9+.-]*:/.test(squarePath))
13
+ return squarePath;
12
14
  if (!path.isAbsolute(squarePath))
13
15
  return squarePath.split(path.sep).join('/');
14
16
  const comparableCwd = fs.realpathSync.native(cwd);
@@ -49,7 +51,7 @@ export function commandPrefix(squarePath) {
49
51
  return `square --location ${quoteShell(squarePath)}`;
50
52
  }
51
53
  export function participantCommandPrefix(squarePath, name) {
52
- return `square --location ${quoteShell(path.resolve(squarePath))} --as ${quoteShell(name)}`;
54
+ return `square --location ${quoteShell(/^[A-Za-z][A-Za-z0-9+.-]*:/.test(squarePath) ? squarePath : path.resolve(squarePath))} --as ${quoteShell(name)}`;
53
55
  }
54
56
  /** Blocked actions end with a full copy-pasteable recovery command. */
55
57
  export function joinRecoveryCommand(squarePath, name) {
@@ -171,7 +173,7 @@ function renderEventCliFacts(event, opts = {}) {
171
173
  ? ` · calls your name across the square — ${participantIdentity(mention)}`
172
174
  : '';
173
175
  const replySuffix = event.reply === undefined ? '' : ` · replies to ${replyId(event.reply)}`;
174
- const meta = ` #${opts.actNumber ?? 1} · ${eventId(event)} · ${formatRelativeTime(event.at, now)}${mentionSuffix}${replySuffix}`;
176
+ const meta = ` · ${eventId(event)} · ${formatRelativeTime(event.at, now)}${mentionSuffix}${replySuffix}`;
175
177
  return { text: `● ${participantIdentity(event.actor)}${style('dim', meta)}${bodySuffix(body.text)}`, bodyClipped: body.clipped };
176
178
  }
177
179
  case 'done': {
@@ -190,7 +192,7 @@ export function renderEventCli(event, opts = {}) {
190
192
  }
191
193
  function renderPresenceOnlySay(event, opts = {}) {
192
194
  const targets = event.reach === 'bell' ? [] : event.mentions ?? [];
193
- const meta = style('dim', ` #${opts.actNumber ?? 1} · ${eventId(event)} · ${formatRelativeTime(event.at, opts.now)}`);
195
+ const meta = style('dim', ` · ${eventId(event)} · ${formatRelativeTime(event.at, opts.now)}`);
194
196
  if (targets.length === 0) {
195
197
  return `● ${participantIdentity(event.actor)}${meta}`;
196
198
  }
@@ -251,14 +253,12 @@ export function renderPendingFeed(publicItems, sayNumbers, perceptions, viewer)
251
253
  export function renderActivityBlocked(opts) {
252
254
  const readNowCommand = `${participantCommandPrefix(opts.squarePath, opts.name)} catch`;
253
255
  return withPathOutput(opts.squarePath, [
254
- `${style('blocked', '✕')} your activity doesn't land — the square moved behind your back`,
256
+ `${style('blocked', '✕')} your activity hasn't landed — someone spoke while you were away`,
255
257
  ...renderUnreadSummary({ activitySummaries: opts.activitySummaries, viewer: opts.name }),
256
258
  ...draftSavedLines(opts.draftPath),
257
259
  `${readNowCommand}`,
258
260
  ' · take it in, then retry:',
259
261
  withDraftInput(opts.retryCommand, opts.draftPath),
260
- ' · optional: express over unread activity with --force:',
261
- withDraftInput(opts.forceCommand, opts.draftPath),
262
262
  ].join('\n'), { participantCount: opts.participantCount, held: opts.held });
263
263
  }
264
264
  /** An indeterminate or already-committed send only points to inspection, never resend. */
@@ -279,14 +279,14 @@ function holdReasonLines(reason) {
279
279
  return text === '' ? [] : [style('dim', ` · ${text}`)];
280
280
  }
281
281
  function heldMainLine(holder, styled) {
282
- const glyph = styled ? style('blocked', '✕') : '✕';
282
+ const glyph = styled ? style('blocked', '✕') : '·';
283
283
  const who = holder === undefined ? 'a hand is raised' : `${participantIdentity(holder)} has a hand raised`;
284
284
  return `${glyph} ${who} — voices drop, yours too`;
285
285
  }
286
286
  export function renderExpressWaiting(opts) {
287
287
  if (opts.reason === 'throttled') {
288
288
  return [
289
- '✕ the square is packed — shoulder to shoulder',
289
+ '· the square is packed — your activity is waiting',
290
290
  ` · a lull opens in ${formatDuration(opts.delayMs)}`,
291
291
  ' · --no-wait saves a draft and returns now',
292
292
  ].join('\n');
@@ -370,7 +370,7 @@ export function renderActivityLimit(opts) {
370
370
  const spoken = opts.count !== undefined && opts.hardCap !== undefined ? ` — ${opts.count}/${opts.hardCap} spoken` : '';
371
371
  const doneCommand = `${participantCommandPrefix(opts.squarePath, opts.name)} done`;
372
372
  return withPathOutput(opts.squarePath, [
373
- `${style('blocked', '✕')} nothing left in you${spoken}`,
373
+ `${style('blocked', '✕')} you’ve reached your speaking cap${spoken}`,
374
374
  ...draftSavedLines(opts.draftPath),
375
375
  ' · your draft stays unsent; done only steps out',
376
376
  doneCommand,
@@ -425,7 +425,7 @@ export function renderWatchStatus(opts) {
425
425
  const spoken = opts.hardCap === undefined || opts.hardCap === null
426
426
  ? ''
427
427
  : ` — ${opts.ownActivityCount ?? 0}/${opts.hardCap} spoken`;
428
- return [`${style('blocked', '✕')} nothing left in you${spoken}`, `${participantCommandPrefix(opts.squarePath, opts.name)} done`].join('\n');
428
+ return [`${style('blocked', '✕')} you’ve reached your speaking cap${spoken}`, `${participantCommandPrefix(opts.squarePath, opts.name)} done`].join('\n');
429
429
  }
430
430
  }
431
431
  }
@@ -0,0 +1,42 @@
1
+ import type { ActivityResult, HistoryQuery, HistoryResult, JoinOptions, JoinResult, ObservationOptions, OperationControl, Participant, SquareAtInput, SquareBuildInput, SquareLocation, StatusOptions, StatusResult, ParticipantsResult, RecoveryResult, DiscoveryOptions, InboxOptions, InboxResult, StreamOptions } from './square-facade.js';
2
+ export type * from './square-facade.js';
3
+ export { createSquareResourceOwner } from './open-square.js';
4
+ export { formatActivityId, parseActivityId, MAX_IDENTITY_SET_SIZE } from './square-core.js';
5
+ export { CATCH_DEFAULT_LIMIT, CATCH_MAX_LIMIT } from './catch-decisions.js';
6
+ export { HELD_WAIT_BUDGET_MS } from './runtime.js';
7
+ export { HISTORY_DEFAULT_LIMIT, HISTORY_MAX_LIMIT } from './views.js';
8
+ export { DEFAULT_LIST_DEPTH, MAX_LIST_DEPTH, DEFAULT_LIST_LIMIT, MAX_LIST_LIMIT } from './list.js';
9
+ export declare function squareClock(env: NodeJS.ProcessEnv, clock?: () => number): () => number;
10
+ /** One concrete square resource. Request handles may borrow a server-owned connection. */
11
+ export declare class SqliteSquare {
12
+ readonly location: string;
13
+ private readonly square;
14
+ private readonly defaultParticipant?;
15
+ private readonly transport;
16
+ private constructor();
17
+ static at(input: SquareAtInput, control?: OperationControl, automaticDelivery?: boolean): Promise<SqliteSquare>;
18
+ static build(input: SquareBuildInput, control?: OperationControl, automaticDelivery?: boolean): Promise<SqliteSquare>;
19
+ static inMemory(input: Omit<SquareBuildInput, 'path' | 'resources'>): SqliteSquare;
20
+ private handle;
21
+ participant(requested?: string): Promise<Participant>;
22
+ join(requested?: string, options?: JoinOptions, control?: OperationControl): Promise<JoinResult>;
23
+ doneOwnedSession(name: string, body: string, expectedEpoch: number, control?: OperationControl): Promise<ActivityResult>;
24
+ implicitJoin(name: string, control?: OperationControl): Promise<{
25
+ readonly state: 'joined' | 'active' | 'done';
26
+ readonly participant?: Participant;
27
+ }>;
28
+ snapshot(control?: OperationControl): Promise<import("./square-facade.js").SquareSnapshot>;
29
+ history(query?: HistoryQuery, control?: OperationControl): Promise<HistoryResult>;
30
+ status(options?: StatusOptions, control?: OperationControl): Promise<StatusResult>;
31
+ participants(options?: ObservationOptions, control?: OperationControl): Promise<ParticipantsResult>;
32
+ recovery(requested?: string, control?: OperationControl): Promise<RecoveryResult>;
33
+ stream(options: StreamOptions, control?: OperationControl): AsyncIterable<import("./square-facade.js").StreamRecord>;
34
+ recognize(env: NodeJS.ProcessEnv): Promise<Participant | null>;
35
+ close(): Promise<void>;
36
+ endOwnedSession(name: string, sessionId: string, expectedEpoch?: number): Promise<ActivityResult | null>;
37
+ retireEndedSessionRoutes(sessionId: string): Promise<void>;
38
+ }
39
+ export declare function diagnoseSquare(input: SquareLocation, control?: OperationControl): Promise<import("./artifact.js").DiagnoseResult>;
40
+ export declare function migrateSquare(input: SquareLocation, control?: OperationControl): Promise<import("./square-migration.js").MigrationOutcome>;
41
+ export declare function discover(input: SquareAtInput, options?: DiscoveryOptions, control?: OperationControl): Promise<import("./square-facade.js").DiscoveryResult>;
42
+ export declare function inbox(input: SquareAtInput, sessionId: string, options?: InboxOptions, control?: OperationControl): Promise<InboxResult>;