@agimon-ai/po-approval 0.0.0-alpha.49 → 0.0.0-alpha.50

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.
@@ -1,6 +1,7 @@
1
1
  import { defineFill, defineNativePlugin } from "@agimon-ai/po-core/native";
2
2
  import { View } from "react-native-unistyles/components/native/View";
3
3
  import { Text } from "react-native-unistyles/components/native/Text";
4
+ import { ScrollView } from "react-native-unistyles/components/native/ScrollView";
4
5
  import { Button, LiveDuration, fontOf } from "@agimon-ai/po-native-components";
5
6
  import { useCallback, useEffect, useState, useSyncExternalStore } from "react";
6
7
  import { StyleSheet } from "react-native-unistyles";
@@ -30,72 +31,76 @@ function ApprovalPromptView({ title, summary, details, requirement, seconds, exp
30
31
  return /* @__PURE__ */ jsxs(View, {
31
32
  style: styles.prompt,
32
33
  accessibilityLabel: "Approval request",
33
- children: [
34
- /* @__PURE__ */ jsx(Text, {
35
- style: styles.label,
36
- children: "Your approval"
37
- }),
38
- /* @__PURE__ */ jsx(Text, {
39
- accessibilityRole: "header",
40
- style: styles.title,
41
- children: title
42
- }),
43
- /* @__PURE__ */ jsx(Text, {
44
- style: styles.summary,
45
- children: summary
46
- }),
47
- /* @__PURE__ */ jsx(View, {
48
- style: styles.details,
49
- children: details.map(({ label, value }) => /* @__PURE__ */ jsxs(View, {
50
- style: styles.detail,
51
- children: [/* @__PURE__ */ jsx(Text, {
52
- style: styles.meta,
53
- children: label
54
- }), /* @__PURE__ */ jsx(Text, {
55
- selectable: true,
56
- style: styles.value,
57
- children: value
58
- })]
59
- }, label))
60
- }),
61
- /* @__PURE__ */ jsxs(View, {
62
- style: styles.footer,
63
- children: [
64
- !decision && !expired && expiresAt !== void 0 ? /* @__PURE__ */ jsx(View, {
65
- accessibilityLiveRegion: "polite",
66
- children: /* @__PURE__ */ jsx(ApprovalCountdown, { expiresAt })
67
- }) : /* @__PURE__ */ jsx(Text, {
68
- accessibilityLiveRegion: "polite",
69
- style: styles.meta,
70
- children: decision || (expired ? "This request expired. Nothing ran." : seconds !== void 0 ? `${seconds} seconds remaining. Nothing runs if time runs out.` : requirement === "human" ? "Only you can approve this in the app." : "Po will wait for your decision.")
71
- }),
72
- /* @__PURE__ */ jsxs(View, {
73
- style: styles.actions,
74
- children: [/* @__PURE__ */ jsx(Button, {
75
- variant: "primary",
76
- style: styles.action,
77
- disabled: inactive,
78
- onPress: onApprove,
79
- children: "Approve"
80
- }), /* @__PURE__ */ jsx(Button, {
81
- variant: "outline",
82
- style: styles.action,
83
- disabled: inactive,
84
- onPress: onDeny,
85
- children: "Deny"
34
+ children: [/* @__PURE__ */ jsxs(ScrollView, {
35
+ style: styles.scroll,
36
+ contentContainerStyle: styles.content,
37
+ children: [
38
+ /* @__PURE__ */ jsx(Text, {
39
+ style: styles.label,
40
+ children: "Your approval"
41
+ }),
42
+ /* @__PURE__ */ jsx(Text, {
43
+ accessibilityRole: "header",
44
+ style: styles.title,
45
+ children: title
46
+ }),
47
+ /* @__PURE__ */ jsx(Text, {
48
+ style: styles.summary,
49
+ children: summary
50
+ }),
51
+ /* @__PURE__ */ jsx(View, {
52
+ style: styles.details,
53
+ children: details.map(({ label, value }) => /* @__PURE__ */ jsxs(View, {
54
+ style: styles.detail,
55
+ children: [/* @__PURE__ */ jsx(Text, {
56
+ style: styles.meta,
57
+ children: label
58
+ }), /* @__PURE__ */ jsx(Text, {
59
+ selectable: true,
60
+ style: styles.value,
61
+ children: value
86
62
  })]
87
- }),
88
- requirement === "ask" && voiceHint && !inactive ? /* @__PURE__ */ jsx(Text, {
89
- style: styles.meta,
90
- children: voiceHint
91
- }) : null
92
- ]
93
- })
94
- ]
63
+ }, label))
64
+ })
65
+ ]
66
+ }), /* @__PURE__ */ jsxs(View, {
67
+ style: styles.footer,
68
+ children: [
69
+ !decision && !expired && expiresAt !== void 0 ? /* @__PURE__ */ jsx(View, {
70
+ accessibilityLiveRegion: "polite",
71
+ children: /* @__PURE__ */ jsx(ApprovalCountdown, { expiresAt })
72
+ }) : /* @__PURE__ */ jsx(Text, {
73
+ accessibilityLiveRegion: "polite",
74
+ style: styles.meta,
75
+ children: decision || (expired ? "This request expired. Nothing ran." : seconds !== void 0 ? `${seconds} seconds remaining. Nothing runs if time runs out.` : requirement === "human" ? "Only you can approve this in the app." : "Po will wait for your decision.")
76
+ }),
77
+ /* @__PURE__ */ jsxs(View, {
78
+ style: styles.actions,
79
+ children: [/* @__PURE__ */ jsx(Button, {
80
+ variant: "primary",
81
+ style: styles.action,
82
+ disabled: inactive,
83
+ onPress: onApprove,
84
+ children: "Approve"
85
+ }), /* @__PURE__ */ jsx(Button, {
86
+ variant: "outline",
87
+ style: styles.action,
88
+ disabled: inactive,
89
+ onPress: onDeny,
90
+ children: "Deny"
91
+ })]
92
+ }),
93
+ requirement === "ask" && voiceHint && !inactive ? /* @__PURE__ */ jsx(Text, {
94
+ style: styles.meta,
95
+ children: voiceHint
96
+ }) : null
97
+ ]
98
+ })]
95
99
  });
96
100
  }
97
101
  const styles = StyleSheet.create((theme) => ({
98
102
  prompt: {
103
+ flexShrink: 1,
99
104
  gap: theme.spacing(2),
100
105
  padding: theme.spacing(4),
101
106
  borderWidth: 1,
@@ -126,6 +131,14 @@ const styles = StyleSheet.create((theme) => ({
126
131
  color: theme.colors.text,
127
132
  uni__dependencies: [0]
128
133
  },
134
+ scroll: {
135
+ flexGrow: 0,
136
+ flexShrink: 1
137
+ },
138
+ content: {
139
+ gap: theme.spacing(2),
140
+ uni__dependencies: [0]
141
+ },
129
142
  details: {
130
143
  gap: theme.spacing(3),
131
144
  paddingVertical: theme.spacing(2),
@@ -1 +1 @@
1
- {"version":3,"file":"native.mjs","names":["Button","fontOf","LiveDuration","useCallback","StyleSheet","remainingSeconds","ApprovalPromptViewProps","ApprovalCountdown","expiresAt","clock","now","seconds","text","nextMs","styles","meta","ApprovalPromptView","title","summary","details","requirement","expired","decision","disabled","onApprove","onDeny","voiceHint","inactive","Boolean","prompt","label","map","value","detail","footer","undefined","actions","action","create","theme","gap","spacing","padding","borderWidth","borderColor","colors","borderRadius","lg","backgroundColor","panel","uni__dependencies","fontFamily","sans","fontSize","sm","color","magenta","fontWeight","medium","lineHeight","hi","semibold","lineHeightRelaxed","paddingVertical","dim","base","borderTopWidth","borderTopColor","paddingTop","flexDirection","minHeight","flex","fillApproval"],"sources":["../../src/extensions/workspaces/sessions/(frontend)/_lib/approvalDeadline.ts","../../src/extensions/workspaces/sessions/(frontend)/_components/ApprovalPromptView.native.tsx","../../src/types/voiceHint.ts","../../src/extensions/workspaces/sessions/(frontend)/_components/useApprovalPrompt.ts","../../src/extensions/workspaces/sessions/(frontend)/_components/ApprovalDialogPrompt.native.tsx","../../src/extensions/workspaces/sessions/(frontend)/_lib/approvalClaim.ts","../../src/extensions/workspaces/sessions/(frontend)/fill/Approval.dialog-prompt.native.tsx","../../generated/native.ts"],"sourcesContent":["/** Whole seconds left before `expiresAt`, or undefined when the request has no deadline. */\nexport function remainingSeconds(expiresAt: number | undefined, now: number): number | undefined {\n return expiresAt === undefined ? undefined : Math.max(0, Math.ceil((expiresAt - now) / 1000));\n}\n","import { Button, fontOf, LiveDuration } from '@agimon-ai/po-native-components';\nimport { useCallback } from 'react';\nimport { Text, View } from 'react-native';\nimport { StyleSheet } from 'react-native-unistyles';\n\nimport { remainingSeconds } from '../_lib/approvalDeadline';\nimport type { ApprovalPromptViewProps } from './ApprovalPromptView.types';\n\nfunction ApprovalCountdown({ expiresAt }: { expiresAt: number }) {\n const clock = useCallback(\n (now: number) => {\n const seconds = remainingSeconds(expiresAt, now);\n return {\n text:\n seconds === 0\n ? 'This request expired. Nothing ran.'\n : `${seconds} seconds remaining. Nothing runs if time runs out.`,\n ...(seconds === 0 ? {} : { nextMs: 1000 }),\n };\n },\n [expiresAt],\n );\n return <LiveDuration clock={clock} style={styles.meta} />;\n}\n\nexport function ApprovalPromptView({\n title,\n summary,\n details,\n requirement,\n seconds,\n expiresAt,\n expired,\n decision,\n disabled,\n onApprove,\n onDeny,\n voiceHint,\n}: ApprovalPromptViewProps) {\n const inactive = disabled || expired || Boolean(decision);\n return (\n <View style={styles.prompt} accessibilityLabel=\"Approval request\">\n <Text style={styles.label}>Your approval</Text>\n <Text accessibilityRole=\"header\" style={styles.title}>\n {title}\n </Text>\n <Text style={styles.summary}>{summary}</Text>\n <View style={styles.details}>\n {details.map(({ label, value }) => (\n <View key={label} style={styles.detail}>\n <Text style={styles.meta}>{label}</Text>\n <Text selectable style={styles.value}>\n {value}\n </Text>\n </View>\n ))}\n </View>\n <View style={styles.footer}>\n {!decision && !expired && expiresAt !== undefined ? (\n <View accessibilityLiveRegion=\"polite\">\n <ApprovalCountdown expiresAt={expiresAt} />\n </View>\n ) : (\n <Text accessibilityLiveRegion=\"polite\" style={styles.meta}>\n {decision ||\n (expired\n ? 'This request expired. Nothing ran.'\n : seconds !== undefined\n ? `${seconds} seconds remaining. Nothing runs if time runs out.`\n : requirement === 'human'\n ? 'Only you can approve this in the app.'\n : 'Po will wait for your decision.')}\n </Text>\n )}\n <View style={styles.actions}>\n <Button variant=\"primary\" style={styles.action} disabled={inactive} onPress={onApprove}>\n Approve\n </Button>\n <Button variant=\"outline\" style={styles.action} disabled={inactive} onPress={onDeny}>\n Deny\n </Button>\n </View>\n {requirement === 'ask' && voiceHint && !inactive ? <Text style={styles.meta}>{voiceHint}</Text> : null}\n </View>\n </View>\n );\n}\n\nconst styles = StyleSheet.create((theme) => ({\n prompt: {\n gap: theme.spacing(2),\n padding: theme.spacing(4),\n borderWidth: 1,\n borderColor: theme.colors['edge-magenta'],\n borderRadius: theme.borderRadius.lg,\n backgroundColor: theme.colors.panel,\n },\n label: {\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.sm,\n color: theme.colors.magenta,\n fontWeight: theme.fontWeight.medium,\n },\n title: {\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.lg,\n lineHeight: theme.lineHeight.lg,\n color: theme.colors.hi,\n fontWeight: theme.fontWeight.semibold,\n },\n summary: {\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.lg,\n lineHeight: theme.lineHeightRelaxed.lg,\n color: theme.colors.text,\n },\n details: { gap: theme.spacing(3), paddingVertical: theme.spacing(2) },\n detail: { gap: theme.spacing(1) },\n meta: {\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.sm,\n lineHeight: theme.lineHeightRelaxed.sm,\n color: theme.colors.dim,\n },\n value: {\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.base,\n lineHeight: theme.lineHeightRelaxed.base,\n color: theme.colors.hi,\n },\n footer: {\n borderTopWidth: 1,\n borderTopColor: theme.colors['border-soft'],\n paddingTop: theme.spacing(3),\n gap: theme.spacing(3),\n },\n actions: { flexDirection: 'row', gap: theme.spacing(2) },\n action: { minHeight: theme.spacing(11), flex: 1 },\n}));\n","import type { SlotDeclaration } from '@agimon-ai/po-core/web';\n\n/** Whether a voice surface can take a spoken approve or deny for a session right now. */\nexport interface ApprovalVoiceHintSource {\n subscribe(listener: () => void): () => void;\n isActive(sessionId: string | null): boolean;\n}\n\nfunction parseApprovalVoiceHintSource(input: unknown): ApprovalVoiceHintSource | null {\n const source = input as Partial<ApprovalVoiceHintSource> | null;\n return typeof source?.subscribe === 'function' && typeof source.isActive === 'function'\n ? (source as ApprovalVoiceHintSource)\n : null;\n}\n\n/** Voice fills this while installed; the hint shows only for `ask` approvals and only while a source is active. */\nexport const approvalVoiceHintSlot: SlotDeclaration<ApprovalVoiceHintSource> = {\n slot: 'approval.voice-hint',\n parse: parseApprovalVoiceHintSource,\n};\n","import type { DialogPromptRenderProps } from '@agimon-ai/po-core/web';\nimport { useEffect, useState, useSyncExternalStore } from 'react';\n\nimport type { ApprovalVoiceHintSource } from '../../../../../types/voiceHint';\nimport { approvalVoiceHintSlot } from '../../../../../types/voiceHint';\nimport { remainingSeconds } from '../_lib/approvalDeadline';\nimport type { ApprovalPromptViewProps } from './ApprovalPromptView.types';\n\nconst VOICE_HINT = 'Or say “approve” or “deny”.';\nconst NO_SOURCES = (): (() => void) => () => undefined;\n\n/** The server decides expiry; stop offering stale choices at the same deadline. */\nfunction useDeadline(expiresAt: number | undefined): boolean {\n const [expired, setExpired] = useState(() => remainingSeconds(expiresAt, Date.now()) === 0);\n useEffect(() => {\n const expired = remainingSeconds(expiresAt, Date.now()) === 0;\n setExpired(expired);\n if (expiresAt === undefined || expired) return undefined;\n const timer = setTimeout(() => setExpired(true), expiresAt - Date.now());\n return () => clearTimeout(timer);\n }, [expiresAt]);\n return expired;\n}\n\nfunction useVoiceActive(sources: readonly ApprovalVoiceHintSource[], sessionId: string | null): boolean {\n const subscribe =\n sources.length === 0\n ? NO_SOURCES\n : (listener: () => void) => {\n const stops = sources.map((source) => source.subscribe(listener));\n return () => {\n for (const stop of stops) stop();\n };\n };\n const read = () => sources.some((source) => source.isActive(sessionId));\n return useSyncExternalStore(subscribe, read, read);\n}\n\n/** The approved view's props for one live dialog. Callbacks answer with the exact select labels. */\nexport function useApprovalPrompt(props: DialogPromptRenderProps): ApprovalPromptViewProps | undefined {\n const approval = props.dialog.approval;\n const expired = useDeadline(approval?.expiresAt);\n const voice = useVoiceActive(\n props.slotData(approvalVoiceHintSlot).map((fill) => fill.data),\n props.sessionId,\n );\n if (approval === undefined) return undefined;\n return {\n title: approval.title,\n summary: approval.summary,\n details: approval.details ?? [],\n requirement: approval.requirement,\n expiresAt: approval.expiresAt,\n expired,\n onApprove: () => props.answer('Approve'),\n onDeny: () => props.answer('Deny'),\n onCancel: props.cancel,\n ...(approval.requirement === 'ask' && voice ? { voiceHint: VOICE_HINT } : {}),\n };\n}\n","import type { DialogPromptRenderProps } from '@agimon-ai/po-core/native';\n\nimport { ApprovalPromptView } from './ApprovalPromptView.native';\nimport { useApprovalPrompt } from './useApprovalPrompt';\n\n/** The approved inline prompt, replacing the composer while the session waits on one approval. */\nexport function ApprovalDialogPrompt(props: DialogPromptRenderProps) {\n const view = useApprovalPrompt(props);\n return view === undefined ? null : <ApprovalPromptView {...view} />;\n}\n","import type { ToolPromptDialog } from '@agimon-ai/po-core/web';\n\n/** Only a select carrying a parsed approval envelope with both exact choices. */\nexport function claimsApproval(dialog: ToolPromptDialog): boolean {\n return (\n dialog.method === 'select' &&\n dialog.approval !== undefined &&\n dialog.options.includes('Approve') &&\n dialog.options.includes('Deny')\n );\n}\n","import { defineFill } from '@agimon-ai/po-core/native';\n\nimport { ApprovalDialogPrompt } from '../_components/ApprovalDialogPrompt.native';\nimport { claimsApproval } from '../_lib/approvalClaim';\n\nexport default defineFill({ data: { claims: claimsApproval, component: ApprovalDialogPrompt } });\n","// Generated by @agimon-ai/po-build. Do not edit by hand.\nimport { defineNativePlugin, type WebPluginContributions } from '@agimon-ai/po-core/native';\n\nimport fillApproval from '../src/extensions/workspaces/sessions/(frontend)/fill/Approval.dialog-prompt.native';\n\nconst via = <T>(identity: Record<string, unknown>, value: unknown): T =>\n (value === undefined ? undefined : { ...identity, ...(value as object) }) as T;\n\nexport const nativePlugin = defineNativePlugin({\n id: 'approval',\n session: {\n get fills(): WebPluginContributions['fills'] { return [via({ slot: 'dialog-prompt', id: 'approval' }, fillApproval)]; },\n },\n});\n"],"mappings":";;;;;;;;;AACA,SAAgB,iBAAiB,WAA+B,KAAiC;CAC/F,OAAO,cAAc,KAAA,IAAY,KAAA,IAAY,KAAK,IAAI,GAAG,KAAK,MAAM,YAAY,OAAO,GAAI,CAAC;AAC9F;;;ACKA,SAASO,kBAAkB,EAAEC,aAAoC;CAC/D,MAAMC,QAAQN,aACXO,QAAgB;EACf,MAAMC,UAAUN,iBAAiBG,WAAWE,GAAG;EAC/C,OAAO;GACLE,MACED,YAAY,IACR,uCACA,GAAGA,QAAO;GAChB,GAAIA,YAAY,IAAI,CAAC,IAAI,EAAEE,QAAQ,IAAK;EAC1C;CACF,GACA,CAACL,SAAS,CACZ;CACA,OAAO,oBAAC,cAAD;EAAqBC;EAAO,OAAOK,OAAOC;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,WAAW,YAClB,OAAO,aAAa,KAAA,KACpB,OAAO,QAAQ,SAAS,SAAS,KACjC,OAAO,QAAQ,SAAS,MAAM;AAElC;;;ACLA,IAAA,wCAAe,WAAW,EAAE,MAAM;CAAE,QAAQ;CAAgB,WAAW;AAAqB,EAAE,CAAC;;;ACA/F,MAAM,OAAU,UAAmC,UAChD,UAAU,KAAA,IAAY,KAAA,IAAY;CAAE,GAAG;CAAU,GAAI;AAAiB;AAEzE,MAAa,eAAe,mBAAmB;CAC7C,IAAI;CACJ,SAAS,EACP,IAAI,QAAyC;EAAE,OAAO,CAAC,IAAI;GAAE,MAAM;GAAiB,IAAI;EAAW,GAAGsB,qCAAY,CAAC;CAAG,EACxH;AACF,CAAC"}
1
+ {"version":3,"file":"native.mjs","names":["Button","fontOf","LiveDuration","useCallback","StyleSheet","remainingSeconds","ApprovalPromptViewProps","ApprovalCountdown","expiresAt","clock","now","seconds","text","nextMs","styles","meta","ApprovalPromptView","title","summary","details","requirement","expired","decision","disabled","onApprove","onDeny","voiceHint","inactive","Boolean","prompt","scroll","content","label","map","value","detail","footer","undefined","actions","action","create","theme","flexShrink","gap","spacing","padding","borderWidth","borderColor","colors","borderRadius","lg","backgroundColor","panel","uni__dependencies","fontFamily","sans","fontSize","sm","color","magenta","fontWeight","medium","lineHeight","hi","semibold","lineHeightRelaxed","flexGrow","paddingVertical","dim","base","borderTopWidth","borderTopColor","paddingTop","flexDirection","minHeight","flex","fillApproval"],"sources":["../../src/extensions/workspaces/sessions/(frontend)/_lib/approvalDeadline.ts","../../src/extensions/workspaces/sessions/(frontend)/_components/ApprovalPromptView.native.tsx","../../src/types/voiceHint.ts","../../src/extensions/workspaces/sessions/(frontend)/_components/useApprovalPrompt.ts","../../src/extensions/workspaces/sessions/(frontend)/_components/ApprovalDialogPrompt.native.tsx","../../src/extensions/workspaces/sessions/(frontend)/_lib/approvalClaim.ts","../../src/extensions/workspaces/sessions/(frontend)/fill/Approval.dialog-prompt.native.tsx","../../generated/native.ts"],"sourcesContent":["/** Whole seconds left before `expiresAt`, or undefined when the request has no deadline. */\nexport function remainingSeconds(expiresAt: number | undefined, now: number): number | undefined {\n return expiresAt === undefined ? undefined : Math.max(0, Math.ceil((expiresAt - now) / 1000));\n}\n","import { Button, fontOf, LiveDuration } from '@agimon-ai/po-native-components';\nimport { useCallback } from 'react';\nimport { ScrollView, Text, View } from 'react-native';\nimport { StyleSheet } from 'react-native-unistyles';\n\nimport { remainingSeconds } from '../_lib/approvalDeadline';\nimport type { ApprovalPromptViewProps } from './ApprovalPromptView.types';\n\nfunction ApprovalCountdown({ expiresAt }: { expiresAt: number }) {\n const clock = useCallback(\n (now: number) => {\n const seconds = remainingSeconds(expiresAt, now);\n return {\n text:\n seconds === 0\n ? 'This request expired. Nothing ran.'\n : `${seconds} seconds remaining. Nothing runs if time runs out.`,\n ...(seconds === 0 ? {} : { nextMs: 1000 }),\n };\n },\n [expiresAt],\n );\n return <LiveDuration clock={clock} style={styles.meta} />;\n}\n\nexport function ApprovalPromptView({\n title,\n summary,\n details,\n requirement,\n seconds,\n expiresAt,\n expired,\n decision,\n disabled,\n onApprove,\n onDeny,\n voiceHint,\n}: ApprovalPromptViewProps) {\n const inactive = disabled || expired || Boolean(decision);\n return (\n <View style={styles.prompt} accessibilityLabel=\"Approval request\">\n {/* Long commands scroll; Approve and Deny stay in reach below. */}\n <ScrollView style={styles.scroll} contentContainerStyle={styles.content}>\n <Text style={styles.label}>Your approval</Text>\n <Text accessibilityRole=\"header\" style={styles.title}>\n {title}\n </Text>\n <Text style={styles.summary}>{summary}</Text>\n <View style={styles.details}>\n {details.map(({ label, value }) => (\n <View key={label} style={styles.detail}>\n <Text style={styles.meta}>{label}</Text>\n <Text selectable style={styles.value}>\n {value}\n </Text>\n </View>\n ))}\n </View>\n </ScrollView>\n <View style={styles.footer}>\n {!decision && !expired && expiresAt !== undefined ? (\n <View accessibilityLiveRegion=\"polite\">\n <ApprovalCountdown expiresAt={expiresAt} />\n </View>\n ) : (\n <Text accessibilityLiveRegion=\"polite\" style={styles.meta}>\n {decision ||\n (expired\n ? 'This request expired. Nothing ran.'\n : seconds !== undefined\n ? `${seconds} seconds remaining. Nothing runs if time runs out.`\n : requirement === 'human'\n ? 'Only you can approve this in the app.'\n : 'Po will wait for your decision.')}\n </Text>\n )}\n <View style={styles.actions}>\n <Button variant=\"primary\" style={styles.action} disabled={inactive} onPress={onApprove}>\n Approve\n </Button>\n <Button variant=\"outline\" style={styles.action} disabled={inactive} onPress={onDeny}>\n Deny\n </Button>\n </View>\n {requirement === 'ask' && voiceHint && !inactive ? <Text style={styles.meta}>{voiceHint}</Text> : null}\n </View>\n </View>\n );\n}\n\nconst styles = StyleSheet.create((theme) => ({\n prompt: {\n flexShrink: 1,\n gap: theme.spacing(2),\n padding: theme.spacing(4),\n borderWidth: 1,\n borderColor: theme.colors['edge-magenta'],\n borderRadius: theme.borderRadius.lg,\n backgroundColor: theme.colors.panel,\n },\n label: {\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.sm,\n color: theme.colors.magenta,\n fontWeight: theme.fontWeight.medium,\n },\n title: {\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.lg,\n lineHeight: theme.lineHeight.lg,\n color: theme.colors.hi,\n fontWeight: theme.fontWeight.semibold,\n },\n summary: {\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.lg,\n lineHeight: theme.lineHeightRelaxed.lg,\n color: theme.colors.text,\n },\n scroll: { flexGrow: 0, flexShrink: 1 },\n content: { gap: theme.spacing(2) },\n details: { gap: theme.spacing(3), paddingVertical: theme.spacing(2) },\n detail: { gap: theme.spacing(1) },\n meta: {\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.sm,\n lineHeight: theme.lineHeightRelaxed.sm,\n color: theme.colors.dim,\n },\n value: {\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.base,\n lineHeight: theme.lineHeightRelaxed.base,\n color: theme.colors.hi,\n },\n footer: {\n borderTopWidth: 1,\n borderTopColor: theme.colors['border-soft'],\n paddingTop: theme.spacing(3),\n gap: theme.spacing(3),\n },\n actions: { flexDirection: 'row', gap: theme.spacing(2) },\n action: { minHeight: theme.spacing(11), flex: 1 },\n}));\n","import type { SlotDeclaration } from '@agimon-ai/po-core/web';\n\n/** Whether a voice surface can take a spoken approve or deny for a session right now. */\nexport interface ApprovalVoiceHintSource {\n subscribe(listener: () => void): () => void;\n isActive(sessionId: string | null): boolean;\n}\n\nfunction parseApprovalVoiceHintSource(input: unknown): ApprovalVoiceHintSource | null {\n const source = input as Partial<ApprovalVoiceHintSource> | null;\n return typeof source?.subscribe === 'function' && typeof source.isActive === 'function'\n ? (source as ApprovalVoiceHintSource)\n : null;\n}\n\n/** Voice fills this while installed; the hint shows only for `ask` approvals and only while a source is active. */\nexport const approvalVoiceHintSlot: SlotDeclaration<ApprovalVoiceHintSource> = {\n slot: 'approval.voice-hint',\n parse: parseApprovalVoiceHintSource,\n};\n","import type { DialogPromptRenderProps } from '@agimon-ai/po-core/web';\nimport { useEffect, useState, useSyncExternalStore } from 'react';\n\nimport type { ApprovalVoiceHintSource } from '../../../../../types/voiceHint';\nimport { approvalVoiceHintSlot } from '../../../../../types/voiceHint';\nimport { remainingSeconds } from '../_lib/approvalDeadline';\nimport type { ApprovalPromptViewProps } from './ApprovalPromptView.types';\n\nconst VOICE_HINT = 'Or say “approve” or “deny”.';\nconst NO_SOURCES = (): (() => void) => () => undefined;\n\n/** The server decides expiry; stop offering stale choices at the same deadline. */\nfunction useDeadline(expiresAt: number | undefined): boolean {\n const [expired, setExpired] = useState(() => remainingSeconds(expiresAt, Date.now()) === 0);\n useEffect(() => {\n const expired = remainingSeconds(expiresAt, Date.now()) === 0;\n setExpired(expired);\n if (expiresAt === undefined || expired) return undefined;\n const timer = setTimeout(() => setExpired(true), expiresAt - Date.now());\n return () => clearTimeout(timer);\n }, [expiresAt]);\n return expired;\n}\n\nfunction useVoiceActive(sources: readonly ApprovalVoiceHintSource[], sessionId: string | null): boolean {\n const subscribe =\n sources.length === 0\n ? NO_SOURCES\n : (listener: () => void) => {\n const stops = sources.map((source) => source.subscribe(listener));\n return () => {\n for (const stop of stops) stop();\n };\n };\n const read = () => sources.some((source) => source.isActive(sessionId));\n return useSyncExternalStore(subscribe, read, read);\n}\n\n/** The approved view's props for one live dialog. Callbacks answer with the exact select labels. */\nexport function useApprovalPrompt(props: DialogPromptRenderProps): ApprovalPromptViewProps | undefined {\n const approval = props.dialog.approval;\n const expired = useDeadline(approval?.expiresAt);\n const voice = useVoiceActive(\n props.slotData(approvalVoiceHintSlot).map((fill) => fill.data),\n props.sessionId,\n );\n if (approval === undefined) return undefined;\n return {\n title: approval.title,\n summary: approval.summary,\n details: approval.details ?? [],\n requirement: approval.requirement,\n expiresAt: approval.expiresAt,\n expired,\n onApprove: () => props.answer('Approve'),\n onDeny: () => props.answer('Deny'),\n onCancel: props.cancel,\n ...(approval.requirement === 'ask' && voice ? { voiceHint: VOICE_HINT } : {}),\n };\n}\n","import type { DialogPromptRenderProps } from '@agimon-ai/po-core/native';\n\nimport { ApprovalPromptView } from './ApprovalPromptView.native';\nimport { useApprovalPrompt } from './useApprovalPrompt';\n\n/** The approved inline prompt, replacing the composer while the session waits on one approval. */\nexport function ApprovalDialogPrompt(props: DialogPromptRenderProps) {\n const view = useApprovalPrompt(props);\n return view === undefined ? null : <ApprovalPromptView {...view} />;\n}\n","import type { ToolPromptDialog } from '@agimon-ai/po-core/web';\n\n/** Only a select carrying a parsed approval envelope with both exact choices. */\nexport function claimsApproval(dialog: ToolPromptDialog): boolean {\n return (\n dialog.method === 'select' &&\n dialog.approval !== undefined &&\n dialog.options.includes('Approve') &&\n dialog.options.includes('Deny')\n );\n}\n","import { defineFill } from '@agimon-ai/po-core/native';\n\nimport { ApprovalDialogPrompt } from '../_components/ApprovalDialogPrompt.native';\nimport { claimsApproval } from '../_lib/approvalClaim';\n\nexport default defineFill({ data: { claims: claimsApproval, component: ApprovalDialogPrompt } });\n","// Generated by @agimon-ai/po-build. Do not edit by hand.\nimport { defineNativePlugin, type WebPluginContributions } from '@agimon-ai/po-core/native';\n\nimport fillApproval from '../src/extensions/workspaces/sessions/(frontend)/fill/Approval.dialog-prompt.native';\n\nconst via = <T>(identity: Record<string, unknown>, value: unknown): T =>\n (value === undefined ? undefined : { ...identity, ...(value as object) }) as T;\n\nexport const nativePlugin = defineNativePlugin({\n id: 'approval',\n session: {\n get fills(): WebPluginContributions['fills'] { return [via({ slot: 'dialog-prompt', id: 'approval' }, fillApproval)]; },\n },\n});\n"],"mappings":";;;;;;;;;;AACA,SAAgB,iBAAiB,WAA+B,KAAiC;CAC/F,OAAO,cAAc,KAAA,IAAY,KAAA,IAAY,KAAK,IAAI,GAAG,KAAK,MAAM,YAAY,OAAO,GAAI,CAAC;AAC9F;;;ACKA,SAASO,kBAAkB,EAAEC,aAAoC;CAC/D,MAAMC,QAAQN,aACXO,QAAgB;EACf,MAAMC,UAAUN,iBAAiBG,WAAWE,GAAG;EAC/C,OAAO;GACLE,MACED,YAAY,IACR,uCACA,GAAGA,QAAO;GAChB,GAAIA,YAAY,IAAI,CAAC,IAAI,EAAEE,QAAQ,IAAK;EAC1C;CACF,GACA,CAACL,SAAS,CACZ;CACA,OAAO,oBAAC,cAAD;EAAqBC;EAAO,OAAOK,OAAOC;CAAK,CAAA;AACxD;AAEA,SAAgBC,mBAAmB,EACjCC,OACAC,SACAC,SACAC,aACAT,SACAH,WACAa,SACAC,UACAC,UACAC,WACAC,QACAC,aAC0B;CAC1B,MAAMC,WAAWJ,YAAYF,WAAWO,QAAQN,QAAQ;CACxD,OACE,qBAAC,MAAD;EAAM,OAAOR,OAAOe;EAAQ,oBAAmB;EAA/C,UAAA,CAEE,qBAAC,YAAD;GAAY,OAAOf,OAAOgB;GAAQ,uBAAuBhB,OAAOiB;GAAhE,UAAA;IACE,oBAAC,MAAD;KAAM,OAAOjB,OAAOkB;KAAO,UAA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AAA,wCAAe,WAAW,EAAE,MAAM;CAAE,QAAQ;CAAgB,WAAW;AAAqB,EAAE,CAAC;;;ACA/F,MAAM,OAAU,UAAmC,UAChD,UAAU,KAAA,IAAY,KAAA,IAAY;CAAE,GAAG;CAAU,GAAI;AAAiB;AAEzE,MAAa,eAAe,mBAAmB;CAC7C,IAAI;CACJ,SAAS,EACP,IAAI,QAAyC;EAAE,OAAO,CAAC,IAAI;GAAE,MAAM;GAAiB,IAAI;EAAW,GAAGuB,qCAAY,CAAC;CAAG,EACxH;AACF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agimon-ai/po-approval",
3
- "version": "0.0.0-alpha.49",
3
+ "version": "0.0.0-alpha.50",
4
4
  "description": "Asks the person before a tool or code-mode method that declares approval runs in a Po session.",
5
5
  "keywords": [
6
6
  "agent-safety",
@@ -62,15 +62,15 @@
62
62
  "access": "public"
63
63
  },
64
64
  "dependencies": {
65
- "@agimon-ai/po-core": "0.0.0-alpha.49",
66
- "@agimon-ai/po-web-components": "0.0.0-alpha.49",
65
+ "@agimon-ai/po-core": "0.0.0-alpha.50",
66
+ "@agimon-ai/po-web-components": "0.0.0-alpha.50",
67
67
  "@deepseek-ai/cordis": "4.0.5",
68
68
  "typebox": "1.4.2"
69
69
  },
70
70
  "devDependencies": {
71
- "@agimon-ai/po-build": "0.0.0-alpha.49",
72
- "@agimon-ai/po-native-components": "0.0.0-alpha.49",
73
- "@agimon-ai/vibe-lint-plugin-po-extension": "0.0.0-alpha.49",
71
+ "@agimon-ai/po-build": "0.0.0-alpha.50",
72
+ "@agimon-ai/po-native-components": "0.0.0-alpha.50",
73
+ "@agimon-ai/vibe-lint-plugin-po-extension": "0.0.0-alpha.50",
74
74
  "@types/node": "26.6.5",
75
75
  "@types/react": "19.3.0",
76
76
  "@types/react-dom": "19.3.0",
@@ -85,7 +85,7 @@
85
85
  "vitest": "5.0.4"
86
86
  },
87
87
  "peerDependencies": {
88
- "@agimon-ai/po-native-components": "0.0.0-alpha.49",
88
+ "@agimon-ai/po-native-components": "0.0.0-alpha.50",
89
89
  "react-native": "0.88.0",
90
90
  "react-native-unistyles": "^3.5.3"
91
91
  },